when getting season number from paths, only look at path file name
This commit is contained in:
parent
9d1180cdc9
commit
a02017a524
|
@ -120,10 +120,12 @@ namespace MediaBrowser.Controller.Library
|
|||
/// <returns>System.Nullable{System.Int32}.</returns>
|
||||
public static int? GetSeasonNumberFromPath(string path)
|
||||
{
|
||||
var filename = Path.GetFileName(path);
|
||||
|
||||
// Look for one of the season folder names
|
||||
foreach (var name in SeasonFolderNames)
|
||||
{
|
||||
var index = path.IndexOf(name, StringComparison.OrdinalIgnoreCase);
|
||||
var index = filename.IndexOf(name, StringComparison.OrdinalIgnoreCase);
|
||||
|
||||
if (index != -1)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user