when getting season number from paths, only look at path file name

pull/702/head
Luke Pulverenti 12 years ago
parent 9d1180cdc9
commit a02017a524

@ -120,10 +120,12 @@ namespace MediaBrowser.Controller.Library
/// <returns>System.Nullable{System.Int32}.</returns> /// <returns>System.Nullable{System.Int32}.</returns>
public static int? GetSeasonNumberFromPath(string path) public static int? GetSeasonNumberFromPath(string path)
{ {
var filename = Path.GetFileName(path);
// Look for one of the season folder names // Look for one of the season folder names
foreach (var name in SeasonFolderNames) foreach (var name in SeasonFolderNames)
{ {
var index = path.IndexOf(name, StringComparison.OrdinalIgnoreCase); var index = filename.IndexOf(name, StringComparison.OrdinalIgnoreCase);
if (index != -1) if (index != -1)
{ {

Loading…
Cancel
Save