aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server.Implementations/Trickplay
diff options
context:
space:
mode:
authorBond-009 <bond.009@outlook.com>2024-05-17 13:51:45 -0400
committerJoshua M. Boniface <joshua@boniface.me>2024-05-17 13:51:45 -0400
commit8139179780f07891cd0d47cedf912ce107156c77 (patch)
treeedf6a8f73cb55f6e5b0ea2e575f0c51b34937123 /Jellyfin.Server.Implementations/Trickplay
parent9a1a58885749a7c4f0354b0f848791e492482ccb (diff)
Backport pull request #11653 from jellyfin/release-10.9.z
Don't generate TrickPlay images for files that don't exist Original-merge: c1615419b9e2ca127315e0e85394581bb427415c Merged-by: crobibero <cody@robibe.ro> Backported-by: Joshua M. Boniface <joshua@boniface.me>
Diffstat (limited to 'Jellyfin.Server.Implementations/Trickplay')
-rw-r--r--Jellyfin.Server.Implementations/Trickplay/TrickplayManager.cs8
1 files changed, 7 insertions, 1 deletions
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;