Split progress bar for split tasks

This replaces the jarring effect of resetting the bar halfway through two concurrent scans.
This commit is contained in:
TwistedUmbrellaX 2024-03-31 07:05:20 -04:00
parent 9097addc50
commit ca47492b9b
2 changed files with 8 additions and 4 deletions

View File

@ -146,7 +146,14 @@ public class BaseItemAnalyzerTask
EdlManager.UpdateEDLFiles(episodes);
}
progress.Report((totalProcessed * 100) / totalQueued);
if (_analysisMode == AnalysisMode.Introduction)
{
progress.Report(((totalProcessed * 100) / totalQueued) / 2);
}
else
{
progress.Report((((totalProcessed * 100) / totalQueued) / 2) + 50);
}
});
if (

View File

@ -81,9 +81,6 @@ public class DetectIntrosCreditsTask : IScheduledTask
baseIntroAnalyzer.AnalyzeItems(progress, cancellationToken);
// reset progress
progress.Report(0);
var baseCreditAnalyzer = new BaseItemAnalyzerTask(
AnalysisMode.Credits,
_loggerFactory.CreateLogger<DetectIntrosCreditsTask>(),