Merge pull request #128 from RepoDevil/10.8
Attempt to verify queue when finishing
This commit is contained in:
commit
f2eae80c54
@ -91,7 +91,9 @@ public class ChapterAnalyzer : IMediaFileAnalyzer
|
|||||||
|
|
||||||
var config = Plugin.Instance?.Configuration ?? new Configuration.PluginConfiguration();
|
var config = Plugin.Instance?.Configuration ?? new Configuration.PluginConfiguration();
|
||||||
|
|
||||||
var minDuration = config.MinimumIntroDuration;
|
var minDuration = mode == AnalysisMode.Introduction ?
|
||||||
|
config.MinimumIntroDuration :
|
||||||
|
config.MinimumCreditsDuration;
|
||||||
int maxDuration = mode == AnalysisMode.Introduction ?
|
int maxDuration = mode == AnalysisMode.Introduction ?
|
||||||
config.MaximumIntroDuration :
|
config.MaximumIntroDuration :
|
||||||
config.MaximumCreditsDuration;
|
config.MaximumCreditsDuration;
|
||||||
|
@ -98,6 +98,20 @@ public class BaseItemAnalyzerTask
|
|||||||
{
|
{
|
||||||
var writeEdl = false;
|
var writeEdl = false;
|
||||||
|
|
||||||
|
var totalRemaining = (Plugin.Instance!.TotalQueued * modeCount) - totalProcessed;
|
||||||
|
|
||||||
|
if (totalRemaining >= queue.Count * modeCount)
|
||||||
|
{
|
||||||
|
queue = new(Plugin.Instance!.QueuedMediaItems);
|
||||||
|
totalQueued = 0;
|
||||||
|
foreach (var kvp in queue)
|
||||||
|
{
|
||||||
|
totalQueued += kvp.Value.Count;
|
||||||
|
}
|
||||||
|
|
||||||
|
totalQueued *= _analysisModes.Count;
|
||||||
|
}
|
||||||
|
|
||||||
// Since the first run of the task can run for multiple hours, ensure that none
|
// Since the first run of the task can run for multiple hours, ensure that none
|
||||||
// of the current media items were deleted from Jellyfin since the task was started.
|
// of the current media items were deleted from Jellyfin since the task was started.
|
||||||
var (episodes, requiredModes) = queueManager.VerifyQueue(
|
var (episodes, requiredModes) = queueManager.VerifyQueue(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user