diff options
| author | Luke <luke.pulverenti@gmail.com> | 2016-10-17 12:32:57 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-10-17 12:32:57 -0400 |
| commit | fb9db5c3c36eca578369cb398c36efd6a15bbea9 (patch) | |
| tree | 98e41f78dd5d7c474ce763157eb3503a165088ed /MediaBrowser.Server.Implementations/Intros/DefaultIntroProvider.cs | |
| parent | f8a248ffd805b810e90bc5ec0619e53f49ebcae5 (diff) | |
| parent | b0147c32f9122c6ce695d2919176ed8b50b94fda (diff) | |
Merge pull request #2240 from MediaBrowser/beta
Beta
Diffstat (limited to 'MediaBrowser.Server.Implementations/Intros/DefaultIntroProvider.cs')
| -rw-r--r-- | MediaBrowser.Server.Implementations/Intros/DefaultIntroProvider.cs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/MediaBrowser.Server.Implementations/Intros/DefaultIntroProvider.cs b/MediaBrowser.Server.Implementations/Intros/DefaultIntroProvider.cs index 9b23d5be4..a1638f722 100644 --- a/MediaBrowser.Server.Implementations/Intros/DefaultIntroProvider.cs +++ b/MediaBrowser.Server.Implementations/Intros/DefaultIntroProvider.cs @@ -66,10 +66,12 @@ namespace MediaBrowser.Server.Implementations.Intros var candidates = new List<ItemWithTrailer>(); var trailerTypes = new List<TrailerType>(); + var sourceTypes = new List<SourceType>(); if (config.EnableIntrosFromMoviesInLibrary) { trailerTypes.Add(TrailerType.LocalTrailer); + sourceTypes.Add(SourceType.Library); } if (IsSupporter) @@ -77,18 +79,22 @@ namespace MediaBrowser.Server.Implementations.Intros if (config.EnableIntrosFromUpcomingTrailers) { trailerTypes.Add(TrailerType.ComingSoonToTheaters); + sourceTypes.Clear(); } if (config.EnableIntrosFromUpcomingDvdMovies) { trailerTypes.Add(TrailerType.ComingSoonToDvd); + sourceTypes.Clear(); } if (config.EnableIntrosFromUpcomingStreamingMovies) { trailerTypes.Add(TrailerType.ComingSoonToStreaming); + sourceTypes.Clear(); } if (config.EnableIntrosFromSimilarMovies) { trailerTypes.Add(TrailerType.Archive); + sourceTypes.Clear(); } } @@ -102,7 +108,8 @@ namespace MediaBrowser.Server.Implementations.Intros IsPlayed = config.EnableIntrosForWatchedContent ? (bool?)null : false, MaxParentalRating = config.EnableIntrosParentalControl ? ratingLevel : null, BlockUnratedItems = config.EnableIntrosParentalControl ? new[] { UnratedItem.Trailer } : new UnratedItem[] { }, - Limit = config.TrailerLimit + Limit = config.TrailerLimit, + SourceTypes = sourceTypes.ToArray() }); candidates.AddRange(trailerResult.Select(i => new ItemWithTrailer |
