From d042cfccb9a7a3a90ffb811cd15f6cc32b2a96da Mon Sep 17 00:00:00 2001 From: ConfusedPolarBear <33811686+ConfusedPolarBear@users.noreply.github.com> Date: Thu, 9 Jun 2022 19:14:05 -0500 Subject: [PATCH] Report scheduled task failure if queue is empty --- .../ScheduledTasks/FingerprinterTask.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ConfusedPolarBear.Plugin.IntroSkipper/ScheduledTasks/FingerprinterTask.cs b/ConfusedPolarBear.Plugin.IntroSkipper/ScheduledTasks/FingerprinterTask.cs index 11bc351..3a15cc1 100644 --- a/ConfusedPolarBear.Plugin.IntroSkipper/ScheduledTasks/FingerprinterTask.cs +++ b/ConfusedPolarBear.Plugin.IntroSkipper/ScheduledTasks/FingerprinterTask.cs @@ -102,6 +102,13 @@ public class FingerprinterTask : IScheduledTask public Task ExecuteAsync(IProgress progress, CancellationToken cancellationToken) { var queue = Plugin.Instance!.AnalysisQueue; + + if (queue.Count == 0) + { + throw new FingerprintException( + "No episodes to analyze: either no show libraries are defined or ffmpeg is not properly installed"); + } + var totalProcessed = 0; // TODO: make configurable