From c106811e8e2c2f1e92e29492d1cbd7705b1378c1 Mon Sep 17 00:00:00 2001 From: TwistedUmbrellaX Date: Mon, 22 Apr 2024 11:00:19 -0400 Subject: [PATCH] Attempt to verify queue when finishing --- .../ScheduledTasks/BaseItemAnalyzerTask.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ConfusedPolarBear.Plugin.IntroSkipper/ScheduledTasks/BaseItemAnalyzerTask.cs b/ConfusedPolarBear.Plugin.IntroSkipper/ScheduledTasks/BaseItemAnalyzerTask.cs index 73e3bbc..aa76baa 100644 --- a/ConfusedPolarBear.Plugin.IntroSkipper/ScheduledTasks/BaseItemAnalyzerTask.cs +++ b/ConfusedPolarBear.Plugin.IntroSkipper/ScheduledTasks/BaseItemAnalyzerTask.cs @@ -98,6 +98,13 @@ public class BaseItemAnalyzerTask { var writeEdl = false; + var totalRemaining = (Plugin.Instance!.TotalQueued * modeCount) - totalProcessed; + + if (totalRemaining >= queue.Count * modeCount) + { + // TODO: Handle items being added dynamically + } + // Since the first run of the task can run for multiple hours, ensure that none // of the current media items were deleted from Jellyfin since the task was started. var (episodes, requiredModes) = queueManager.VerifyQueue(