The Free Software Media System - Server Backend & API
Backport pull request #12964 from jellyfin/release-10.10.z
nyanmisaka547d393af053
diff --git a/Jellyfin.Server.Implementations/Trickplay/TrickplayManager.cs b/Jellyfin.Server.Implementations/Trickplay/TrickplayManager.csindex cfe385106a..af57bc134d 100644--- a/Jellyfin.Server.Implementations/Trickplay/TrickplayManager.cs+++ b/Jellyfin.Server.Implementations/Trickplay/TrickplayManager.cs@@ -238,7 +238,7 @@ public class TrickplayManager : ITrickplayManagerforeach (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);}