Use dto instead of db object when returning trickplay

This commit is contained in:
Cody Robibero
2025-06-16 18:55:21 -06:00
parent 0fc8ed6aeb
commit afa2103d42
3 changed files with 69 additions and 2 deletions

View File

@@ -1065,7 +1065,12 @@ namespace Emby.Server.Implementations.Dto
if (options.ContainsField(ItemFields.Trickplay))
{
dto.Trickplay = _trickplayManager.GetTrickplayManifest(item).GetAwaiter().GetResult();
var trickplay = _trickplayManager.GetTrickplayManifest(item).GetAwaiter().GetResult();
dto.Trickplay = trickplay.ToDictionary(
mediaStream => mediaStream.Key,
mediaStream => mediaStream.Value.ToDictionary(
width => width.Key,
width => new TrickplayInfoDto(width.Value)));
}
dto.ExtraType = video.ExtraType;