From 85ea6de26c76eb97d04a759ca2bfe0fc51461866 Mon Sep 17 00:00:00 2001 From: TwistedUmbrellaX <1173913+AbandonedCart@users.noreply.github.com> Date: Tue, 23 Apr 2024 18:26:31 -0400 Subject: [PATCH] Update BaseItemAnalyzerTask.cs --- .../ScheduledTasks/BaseItemAnalyzerTask.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ConfusedPolarBear.Plugin.IntroSkipper/ScheduledTasks/BaseItemAnalyzerTask.cs b/ConfusedPolarBear.Plugin.IntroSkipper/ScheduledTasks/BaseItemAnalyzerTask.cs index aa76baa..2870876 100644 --- a/ConfusedPolarBear.Plugin.IntroSkipper/ScheduledTasks/BaseItemAnalyzerTask.cs +++ b/ConfusedPolarBear.Plugin.IntroSkipper/ScheduledTasks/BaseItemAnalyzerTask.cs @@ -102,7 +102,13 @@ public class BaseItemAnalyzerTask if (totalRemaining >= queue.Count * modeCount) { - // TODO: Handle items being added dynamically + totalQueued = 0; + foreach (var kvp in Plugin.Instance!.QueuedMediaItems) + { + totalQueued += kvp.Value.Count; + } + + totalQueued *= _analysisModes.Count; } // Since the first run of the task can run for multiple hours, ensure that none