ソースを参照

Make keyframe extraction task cancellable (#14368)

Tim Eisele 1 日 前
コミット
96c9f4fdad

+ 2 - 0
src/Jellyfin.MediaEncoding.Hls/ScheduledTasks/KeyframeExtractionScheduledTask.cs

@@ -75,6 +75,8 @@ public class KeyframeExtractionScheduledTask : IScheduledTask
             var videos = _libraryManager.GetItemList(query);
             var videos = _libraryManager.GetItemList(query);
             foreach (var video in videos)
             foreach (var video in videos)
             {
             {
+                cancellationToken.ThrowIfCancellationRequested();
+
                 // Only local files supported
                 // Only local files supported
                 var path = video.Path;
                 var path = video.Path;
                 if (File.Exists(path))
                 if (File.Exists(path))