From 547d393af053b4dc0d9ab29c4d2da542b617e2f6 Mon Sep 17 00:00:00 2001 From: nyanmisaka Date: Tue, 19 Nov 2024 15:43:23 -0500 Subject: [PATCH] Backport pull request #12964 from jellyfin/release-10.10.z Fix height of imported trickplay tiles Original-merge: 09c377fb6c50b29f7b6cf03e14ac09b4b556db38 Merged-by: joshuaboniface Backported-by: Joshua M. Boniface --- Jellyfin.Server.Implementations/Trickplay/TrickplayManager.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jellyfin.Server.Implementations/Trickplay/TrickplayManager.cs b/Jellyfin.Server.Implementations/Trickplay/TrickplayManager.cs index cfe385106a..af57bc134d 100644 --- a/Jellyfin.Server.Implementations/Trickplay/TrickplayManager.cs +++ b/Jellyfin.Server.Implementations/Trickplay/TrickplayManager.cs @@ -238,7 +238,7 @@ public class TrickplayManager : ITrickplayManager foreach (var tile in existingFiles) { var image = _imageEncoder.GetImageSize(tile); - localTrickplayInfo.Height = Math.Max(localTrickplayInfo.Height, image.Height); + localTrickplayInfo.Height = Math.Max(localTrickplayInfo.Height, (int)Math.Ceiling((double)image.Height / localTrickplayInfo.TileHeight)); var bitrate = (int)Math.Ceiling((decimal)new FileInfo(tile).Length * 8 / localTrickplayInfo.TileWidth / localTrickplayInfo.TileHeight / (localTrickplayInfo.Interval / 1000)); localTrickplayInfo.Bandwidth = Math.Max(localTrickplayInfo.Bandwidth, bitrate); }