The Free Software Media System - Server Backend & API
exclude unrated from intros
Luke Pulverenti512740cfb24a
diff --git a/MediaBrowser.Server.Implementations/Intros/DefaultIntroProvider.cs b/MediaBrowser.Server.Implementations/Intros/DefaultIntroProvider.csindex 4a43befede..9b23d5be40 100644--- a/MediaBrowser.Server.Implementations/Intros/DefaultIntroProvider.cs+++ b/MediaBrowser.Server.Implementations/Intros/DefaultIntroProvider.cs@@ -99,8 +99,9 @@ namespace MediaBrowser.Server.Implementations.IntrosIncludeItemTypes = new[] { typeof(Trailer).Name },TrailerTypes = trailerTypes.ToArray(),SimilarTo = item,- IsPlayed = config.EnableIntrosForWatchedContent ? (bool?) null : false,+ IsPlayed = config.EnableIntrosForWatchedContent ? (bool?)null : false,MaxParentalRating = config.EnableIntrosParentalControl ? ratingLevel : null,+ BlockUnratedItems = config.EnableIntrosParentalControl ? new[] { UnratedItem.Trailer } : new UnratedItem[] { },Limit = config.TrailerLimit});@@ -110,7 +111,7 @@ namespace MediaBrowser.Server.Implementations.IntrosType = i.SourceType == SourceType.Channel ? ItemWithTrailerType.ChannelTrailer : ItemWithTrailerType.ItemWithTrailer,LibraryManager = _libraryManager}));- }+ }return GetResult(item, candidates, config);}@@ -197,7 +198,7 @@ namespace MediaBrowser.Server.Implementations.Intros}returnResult.AddRange(GetMediaInfoIntrosByTags(allIntros, item.Tags).Take(1));-+return returnResult.DistinctBy(i => i.Path, StringComparer.OrdinalIgnoreCase);}catch (IOException)