diff options
| author | Eric Reed <ebr@mediabrowser3.com> | 2013-06-20 12:19:55 -0400 |
|---|---|---|
| committer | Eric Reed <ebr@mediabrowser3.com> | 2013-06-20 12:19:55 -0400 |
| commit | a8d070d07bc59979eb6531bf56c1bbdb0e6a9df3 (patch) | |
| tree | 2a7fa8357c63397e95df0a072cea5e3d6564c15b /MediaBrowser.Controller/Library/TVUtils.cs | |
| parent | b02287c0dd6d2f58b4559ae05a9972665ea13521 (diff) | |
| parent | 6f15aeccd0946f19145cc063a8982d585b77df91 (diff) | |
Merge branch 'master' of https://github.com/MediaBrowser/MediaBrowser
Diffstat (limited to 'MediaBrowser.Controller/Library/TVUtils.cs')
| -rw-r--r-- | MediaBrowser.Controller/Library/TVUtils.cs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/MediaBrowser.Controller/Library/TVUtils.cs b/MediaBrowser.Controller/Library/TVUtils.cs index 921bbb808..03df934cf 100644 --- a/MediaBrowser.Controller/Library/TVUtils.cs +++ b/MediaBrowser.Controller/Library/TVUtils.cs @@ -179,7 +179,7 @@ namespace MediaBrowser.Controller.Library private static bool IsSeasonFolder(string path) { // It's a season folder if it's named as such and does not contain any audio files, apart from theme.mp3 - return GetSeasonNumberFromPath(path) != null && !new DirectoryInfo(path).EnumerateFiles().Any(i => EntityResolutionHelper.IsAudioFile(i.FullName) && !string.Equals(Path.GetFileNameWithoutExtension(i.Name), BaseItem.ThemeSongFilename)); + return GetSeasonNumberFromPath(path) != null && !Directory.EnumerateFiles(path).Any(i => EntityResolutionHelper.IsAudioFile(i) && !string.Equals(Path.GetFileNameWithoutExtension(i), BaseItem.ThemeSongFilename)); } /// <summary> @@ -223,7 +223,9 @@ namespace MediaBrowser.Controller.Library } else { - if (EntityResolutionHelper.IsVideoFile(child.FullName) && GetEpisodeNumberFromFile(child.FullName, false).HasValue) + var fullName = child.FullName; + + if (EntityResolutionHelper.IsVideoFile(fullName) && GetEpisodeNumberFromFile(fullName, false).HasValue) { return true; } @@ -275,7 +277,7 @@ namespace MediaBrowser.Controller.Library } private static readonly CultureInfo UsCulture = new CultureInfo("en-US"); - + private static int? ParseEpisodeNumber(string val) { int num; |
