diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-06-07 12:07:16 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-06-07 12:07:16 -0400 |
| commit | a02017a5243b872b9ab47a5497b11bfcd2182b3d (patch) | |
| tree | 99b4e48f32063bea03294aa739d5f6709859eb3f | |
| parent | 9d1180cdc91470b8a389ed88db4e1a8d6c2fec30 (diff) | |
when getting season number from paths, only look at path file name
| -rw-r--r-- | MediaBrowser.Controller/Library/TVUtils.cs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/MediaBrowser.Controller/Library/TVUtils.cs b/MediaBrowser.Controller/Library/TVUtils.cs index a322b01d7..0df48bdf4 100644 --- a/MediaBrowser.Controller/Library/TVUtils.cs +++ b/MediaBrowser.Controller/Library/TVUtils.cs @@ -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) { |
