aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/Intros/DefaultIntroProvider.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2014-09-30 00:47:30 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2014-09-30 00:47:30 -0400
commit4aa959c1e266442804b6961aeb2d09f4b812f744 (patch)
tree3f43d42aacadb463dd945e663657a51dc5808b19 /MediaBrowser.Server.Implementations/Intros/DefaultIntroProvider.cs
parent1fcfff41c7d33266a059b9f4161f9aea34be8de4 (diff)
display trailers within suggestions
Diffstat (limited to 'MediaBrowser.Server.Implementations/Intros/DefaultIntroProvider.cs')
-rw-r--r--MediaBrowser.Server.Implementations/Intros/DefaultIntroProvider.cs19
1 files changed, 17 insertions, 2 deletions
diff --git a/MediaBrowser.Server.Implementations/Intros/DefaultIntroProvider.cs b/MediaBrowser.Server.Implementations/Intros/DefaultIntroProvider.cs
index c47eb82de..4060bec3d 100644
--- a/MediaBrowser.Server.Implementations/Intros/DefaultIntroProvider.cs
+++ b/MediaBrowser.Server.Implementations/Intros/DefaultIntroProvider.cs
@@ -95,14 +95,29 @@ namespace MediaBrowser.Server.Implementations.Intros
}));
}
- if (config.EnableIntrosFromUpcomingTrailers && IsSupporter)
+ var trailerTypes = new List<TrailerType>();
+
+ if (config.EnableIntrosFromUpcomingTrailers)
+ {
+ trailerTypes.Add(TrailerType.ComingSoonToTheaters);
+ }
+ if (config.EnableIntrosFromUpcomingDvdMovies)
+ {
+ trailerTypes.Add(TrailerType.ComingSoonToDvd);
+ }
+ if (config.EnableIntrosFromUpcomingStreamingMovies)
+ {
+ trailerTypes.Add(TrailerType.ComingSoonToStreaming);
+ }
+
+ if (trailerTypes.Count > 0 && IsSupporter)
{
var channelTrailers = await _channelManager.GetAllMediaInternal(new AllChannelMediaQuery
{
ContentTypes = new[] { ChannelMediaContentType.MovieExtra },
ExtraTypes = new[] { ExtraType.Trailer },
UserId = user.Id.ToString("N"),
- TrailerTypes = new[] { TrailerType.ComingSoonToTheaters }
+ TrailerTypes = trailerTypes.ToArray()
}, CancellationToken.None);