浏览代码

Merge pull request #12964 from nyanmisaka/fix-imported-trickplay-height

Fix height of imported trickplay tiles
Joshua M. Boniface 6 月之前
父节点
当前提交
09c377fb6c
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Jellyfin.Server.Implementations/Trickplay/TrickplayManager.cs

+ 1 - 1
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);
                         }