mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-03-16 07:06:18 +00:00
update now playing screen
This commit is contained in:
@@ -105,11 +105,10 @@ namespace Emby.Server.Implementations.Library
|
||||
return inputItems
|
||||
.Cast<Audio>()
|
||||
.Select(i => new Tuple<Audio, int>(i, i.Genres.Count(genresDictionary.ContainsKey)))
|
||||
.Where(i => i.Item2 > 0)
|
||||
.OrderByDescending(i => i.Item2)
|
||||
.ThenBy(i => Guid.NewGuid())
|
||||
.Select(i => i.Item1)
|
||||
.Take(100)
|
||||
.Take(200)
|
||||
.OrderBy(i => Guid.NewGuid());
|
||||
}
|
||||
|
||||
|
||||
@@ -404,13 +404,6 @@ namespace MediaBrowser.Api.UserLibrary
|
||||
/// <param name="request">The request.</param>
|
||||
/// <returns>System.Object.</returns>
|
||||
public object Get(GetLocalTrailers request)
|
||||
{
|
||||
var result = GetAsync(request);
|
||||
|
||||
return ToOptimizedSerializedResultUsingCache(result);
|
||||
}
|
||||
|
||||
private List<BaseItemDto> GetAsync(GetLocalTrailers request)
|
||||
{
|
||||
var user = _userManager.GetUserById(request.UserId);
|
||||
|
||||
@@ -430,7 +423,7 @@ namespace MediaBrowser.Api.UserLibrary
|
||||
.Select(_libraryManager.GetItemById)
|
||||
.Select(i => _dtoService.GetBaseItemDto(i, dtoOptions, user, item));
|
||||
|
||||
return dtos.ToList();
|
||||
return ToOptimizedSerializedResultUsingCache(dtos);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -47,6 +47,8 @@ namespace MediaBrowser.MediaEncoding.Probing
|
||||
|
||||
info.MediaStreams = internalStreams.Select(s => GetMediaStream(isAudio, s, data.format))
|
||||
.Where(i => i != null)
|
||||
// Drop subtitle streams if we don't know the codec because it will just cause failures if we don't know how to handle them
|
||||
.Where(i => i.Type != MediaStreamType.Subtitle || !string.IsNullOrWhiteSpace(i.Codec))
|
||||
.ToList();
|
||||
|
||||
if (data.format != null)
|
||||
|
||||
Reference in New Issue
Block a user