fixes #865 - Series Season folders
This commit is contained in:
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…
Reference in New Issue
Block a user