fixes #865 - Series Season folders

pull/702/head
Luke Pulverenti 11 years ago
parent e2b3320f80
commit d6aee6a2ed

@ -129,6 +129,12 @@ namespace MediaBrowser.Controller.Library
return 0;
}
int val;
if (int.TryParse(filename, NumberStyles.Integer, CultureInfo.InvariantCulture, out val))
{
return val;
}
// Look for one of the season folder names
foreach (var name in SeasonFolderNames)
{

@ -161,6 +161,8 @@ namespace MediaBrowser.Tests.Resolvers
Assert.AreEqual(1, TVUtils.GetSeasonNumberFromPath(@"\Drive\Season 1"));
Assert.AreEqual(1, TVUtils.GetSeasonNumberFromPath(@"\Drive\Season 1"));
Assert.AreEqual(2, TVUtils.GetSeasonNumberFromPath(@"\Drive\Seinfeld\2"));
//Four Digits seasons
Assert.AreEqual(2009, TVUtils.GetSeasonNumberFromPath(@"\Drive\Season 2009"));
Assert.AreEqual(2009, TVUtils.GetSeasonNumberFromPath(@"\Drive\Season 2009"));

Loading…
Cancel
Save