Report scheduled task failure if queue is empty

This commit is contained in:
ConfusedPolarBear 2022-06-09 19:14:05 -05:00
parent db1fc45993
commit d042cfccb9

View File

@ -102,6 +102,13 @@ public class FingerprinterTask : IScheduledTask
public Task ExecuteAsync(IProgress<double> 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