mirror of https://github.com/jellyfin/jellyfin.git
Minor code review changes (cvium)
This commit is contained in:
parent
5a860710a8
commit
f97e844c4f
|
@ -239,7 +239,7 @@ public class TrickplayManager : ITrickplayManager
|
||||||
var tilePath = Path.Combine(workDir, $"{i}.jpg");
|
var tilePath = Path.Combine(workDir, $"{i}.jpg");
|
||||||
|
|
||||||
imageOptions.OutputPath = tilePath;
|
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
|
// Generate image and use returned height for tiles info
|
||||||
var height = _imageEncoder.CreateTrickplayTile(imageOptions, options.JpegQuality, trickplayInfo.Width, trickplayInfo.Height != 0 ? trickplayInfo.Height : null);
|
var height = _imageEncoder.CreateTrickplayTile(imageOptions, options.JpegQuality, trickplayInfo.Width, trickplayInfo.Height != 0 ? trickplayInfo.Height : null);
|
||||||
|
|
|
@ -925,8 +925,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
||||||
|
|
||||||
cancellationToken.ThrowIfCancellationRequested();
|
cancellationToken.ThrowIfCancellationRequested();
|
||||||
|
|
||||||
var jpegCount = _fileSystem.GetFilePaths(targetDirectory)
|
var jpegCount = _fileSystem.GetFilePaths(targetDirectory).Count();
|
||||||
.Count(i => string.Equals(Path.GetExtension(i), ".jpg", StringComparison.OrdinalIgnoreCase));
|
|
||||||
|
|
||||||
isResponsive = jpegCount > lastCount;
|
isResponsive = jpegCount > lastCount;
|
||||||
lastCount = jpegCount;
|
lastCount = jpegCount;
|
||||||
|
|
Loading…
Reference in New Issue