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:
parent
9097addc50
commit
ca47492b9b
@ -146,7 +146,14 @@ public class BaseItemAnalyzerTask
|
|||||||
EdlManager.UpdateEDLFiles(episodes);
|
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 (
|
if (
|
||||||
|
@ -81,9 +81,6 @@ public class DetectIntrosCreditsTask : IScheduledTask
|
|||||||
|
|
||||||
baseIntroAnalyzer.AnalyzeItems(progress, cancellationToken);
|
baseIntroAnalyzer.AnalyzeItems(progress, cancellationToken);
|
||||||
|
|
||||||
// reset progress
|
|
||||||
progress.Report(0);
|
|
||||||
|
|
||||||
var baseCreditAnalyzer = new BaseItemAnalyzerTask(
|
var baseCreditAnalyzer = new BaseItemAnalyzerTask(
|
||||||
AnalysisMode.Credits,
|
AnalysisMode.Credits,
|
||||||
_loggerFactory.CreateLogger<DetectIntrosCreditsTask>(),
|
_loggerFactory.CreateLogger<DetectIntrosCreditsTask>(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user