update cinema mode config page

This commit is contained in:
Luke Pulverenti 2015-11-17 11:37:16 -05:00
parent 51d00cf3fd
commit 664bcadbad
2 changed files with 13 additions and 4 deletions

View File

@ -11,6 +11,7 @@ namespace MediaBrowser.Model.Configuration
public bool EnableIntrosParentalControl { get; set; } public bool EnableIntrosParentalControl { get; set; }
public bool EnableIntrosFromSimilarMovies { get; set; } public bool EnableIntrosFromSimilarMovies { get; set; }
public string CustomIntroPath { get; set; } public string CustomIntroPath { get; set; }
public string CodecIntroPath { get; set; }
public bool EnableIntrosFromUpcomingDvdMovies { get; set; } public bool EnableIntrosFromUpcomingDvdMovies { get; set; }
public bool EnableIntrosFromUpcomingStreamingMovies { get; set; } public bool EnableIntrosFromUpcomingStreamingMovies { get; set; }

View File

@ -237,13 +237,21 @@ namespace MediaBrowser.Server.Implementations.Intros
{ {
options = options ?? GetOptions(); options = options ?? GetOptions();
if (string.IsNullOrWhiteSpace(options.CustomIntroPath)) var list = new List<string>();
if (!string.IsNullOrWhiteSpace(options.CustomIntroPath))
{ {
return new List<string>(); list.AddRange(_fileSystem.GetFilePaths(options.CustomIntroPath, true)
.Where(_libraryManager.IsVideoFile));
} }
return _fileSystem.GetFilePaths(options.CustomIntroPath, true) if (!string.IsNullOrWhiteSpace(options.CodecIntroPath))
.Where(_libraryManager.IsVideoFile); {
list.AddRange(_fileSystem.GetFilePaths(options.CodecIntroPath, true)
.Where(_libraryManager.IsVideoFile));
}
return list.Distinct(StringComparer.OrdinalIgnoreCase);
} }
private bool FilterByParentalRating(int? ratingLevel, BaseItem item) private bool FilterByParentalRating(int? ratingLevel, BaseItem item)