aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server.Implementations/Trickplay
diff options
context:
space:
mode:
authorNick <20588554+nicknsy@users.noreply.github.com>2023-09-04 13:14:45 -0700
committerNick <20588554+nicknsy@users.noreply.github.com>2023-09-04 13:14:45 -0700
commitf97e844c4fc2fb7626cc2e9fd706f9ce27d7c115 (patch)
tree5d12eed97df5c572d34b3636fe98abe7d18cadac /Jellyfin.Server.Implementations/Trickplay
parent5a860710a849b9d67d12731f1a616c4a3904487d (diff)
Minor code review changes (cvium)
Diffstat (limited to 'Jellyfin.Server.Implementations/Trickplay')
-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 107f8e510..b960feb7f 100644
--- a/Jellyfin.Server.Implementations/Trickplay/TrickplayManager.cs
+++ b/Jellyfin.Server.Implementations/Trickplay/TrickplayManager.cs
@@ -239,7 +239,7 @@ public class TrickplayManager : ITrickplayManager
var tilePath = Path.Combine(workDir, $"{i}.jpg");
imageOptions.OutputPath = tilePath;
- imageOptions.InputPaths = images.Skip(i * thumbnailsPerTile).Take(thumbnailsPerTile).ToList();
+ imageOptions.InputPaths = images.GetRange(i * thumbnailsPerTile, Math.Min(thumbnailsPerTile, images.Count - (i * thumbnailsPerTile)));
// Generate image and use returned height for tiles info
var height = _imageEncoder.CreateTrickplayTile(imageOptions, options.JpegQuality, trickplayInfo.Width, trickplayInfo.Height != 0 ? trickplayInfo.Height : null);