mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-04-24 14:08:44 -04:00
Fix height of imported trickplay tiles
fixes c56dbc1
Signed-off-by: nyanmisaka <nst799610810@gmail.com>
This commit is contained in:
parent
3089e9e40a
commit
2354cd45d4
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue