From c1615419b9e2ca127315e0e85394581bb427415c Mon Sep 17 00:00:00 2001 From: Bond-009 Date: Thu, 16 May 2024 01:26:42 +0200 Subject: [PATCH] Don't generate TrickPlay images for files that don't exist (#11653) --- .../Trickplay/TrickplayManager.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Jellyfin.Server.Implementations/Trickplay/TrickplayManager.cs b/Jellyfin.Server.Implementations/Trickplay/TrickplayManager.cs index 31c0be52f..ccd04612f 100644 --- a/Jellyfin.Server.Implementations/Trickplay/TrickplayManager.cs +++ b/Jellyfin.Server.Implementations/Trickplay/TrickplayManager.cs @@ -121,6 +121,13 @@ public class TrickplayManager : ITrickplayManager return; } + var mediaPath = mediaSource.Path; + if (!File.Exists(mediaPath)) + { + _logger.LogWarning("Media source {MediaSourceId} not found at {Path} for item {ItemID}", mediaSource.Id, mediaPath, video.Id); + return; + } + // The width has to be even, otherwise a lot of filters will not be able to sample it var actualWidth = 2 * (width / 2); @@ -139,7 +146,6 @@ public class TrickplayManager : ITrickplayManager return; } - var mediaPath = mediaSource.Path; var mediaStream = mediaSource.VideoStream; var container = mediaSource.Container;