mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-22 18:14:42 +01:00
display trailers within suggestions
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user