display trailers within suggestions

This commit is contained in:
Luke Pulverenti
2014-09-30 00:47:30 -04:00
parent 1fcfff41c7
commit 4aa959c1e2
35 changed files with 719 additions and 400 deletions

View File

@@ -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);