aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornyanmisaka <nst799610810@gmail.com>2024-11-19 15:43:23 -0500
committerJoshua M. Boniface <joshua@boniface.me>2024-11-19 15:43:23 -0500
commit547d393af053b4dc0d9ab29c4d2da542b617e2f6 (patch)
treece8436597b724f374740222e076d67f7398e8aa8
parentee66c745274ae0b24022ec077e39d6bb9d6d6469 (diff)
Backport pull request #12964 from jellyfin/release-10.10.z
Fix height of imported trickplay tiles Original-merge: 09c377fb6c50b29f7b6cf03e14ac09b4b556db38 Merged-by: joshuaboniface <joshua@boniface.me> Backported-by: Joshua M. Boniface <joshua@boniface.me>
-rw-r--r--Jellyfin.Server.Implementations/Trickplay/TrickplayManager.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Jellyfin.Server.Implementations/Trickplay/TrickplayManager.cs b/Jellyfin.Server.Implementations/Trickplay/TrickplayManager.cs
index cfe385106..af57bc134 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);
}