mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-01 10:45:00 -05:00
Sort trailers before teasers (#14715)
This commit is contained in:
parent
3fad5eb069
commit
da19f02f7b
@ -340,9 +340,12 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.Movies
|
|||||||
if (movieResult.Videos?.Results is not null)
|
if (movieResult.Videos?.Results is not null)
|
||||||
{
|
{
|
||||||
var trailers = new List<MediaUrl>();
|
var trailers = new List<MediaUrl>();
|
||||||
for (var i = 0; i < movieResult.Videos.Results.Count; i++)
|
|
||||||
|
var sortedVideos = movieResult.Videos.Results
|
||||||
|
.OrderByDescending(video => string.Equals(video.Type, "trailer", StringComparison.OrdinalIgnoreCase));
|
||||||
|
|
||||||
|
foreach (var video in sortedVideos)
|
||||||
{
|
{
|
||||||
var video = movieResult.Videos.Results[i];
|
|
||||||
if (!TmdbUtils.IsTrailerType(video))
|
if (!TmdbUtils.IsTrailerType(video))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user