diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-06-01 18:35:19 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-06-01 18:35:19 -0400 |
| commit | 8c403a4dc84d2a83951e538bedef5fd4c6a10961 (patch) | |
| tree | 1c545b84f8ddb098b0ca306a36a1dab8bbc9beaa | |
| parent | dbf214883c0199be4a7a1bc02145c014fc029c0e (diff) | |
exclude theme song from album resolution
| -rw-r--r-- | MediaBrowser.Controller/Library/TVUtils.cs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/MediaBrowser.Controller/Library/TVUtils.cs b/MediaBrowser.Controller/Library/TVUtils.cs index 9538e927a..a322b01d7 100644 --- a/MediaBrowser.Controller/Library/TVUtils.cs +++ b/MediaBrowser.Controller/Library/TVUtils.cs @@ -1,4 +1,5 @@ -using MediaBrowser.Controller.Resolvers; +using MediaBrowser.Controller.Entities; +using MediaBrowser.Controller.Resolvers; using System; using System.Collections.Generic; using System.Globalization; @@ -175,7 +176,8 @@ namespace MediaBrowser.Controller.Library /// <returns><c>true</c> if [is season folder] [the specified path]; otherwise, <c>false</c>.</returns> private static bool IsSeasonFolder(string path) { - return GetSeasonNumberFromPath(path) != null && !new DirectoryInfo(path).EnumerateFiles().Any(i => EntityResolutionHelper.IsAudioFile(i.FullName)); + // 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)); } /// <summary> |
