mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-04-23 21:47:14 -04:00
fixes #865 - Series Season folders
This commit is contained in:
parent
e2b3320f80
commit
d6aee6a2ed
2 changed files with 8 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue