mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-03-18 16:16:17 +00:00
Backport pull request #12964 from jellyfin/release-10.10.z
Fix height of imported trickplay tiles
Original-merge: 09c377fb6c
Merged-by: joshuaboniface <joshua@boniface.me>
Backported-by: Joshua M. Boniface <joshua@boniface.me>
This commit is contained in:
committed by
Joshua M. Boniface
parent
ee66c74527
commit
547d393af0
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user