Still cancel automation for scheduled
The priority should starts at scheduled task (a full scan), but automatic scans will add items to them. Library scan is next, but again it should allow appending. Item scans should be last and get overridden by the other two.
This commit is contained in:
parent
3096f3fe6a
commit
de60fd236f
@ -74,6 +74,11 @@ public class DetectCreditsTask : IScheduledTask
|
||||
{
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
else if (Plugin.Instance!.AnalyzerTaskIsRunning && Entrypoint.AutomaticTaskState == TaskState.Running)
|
||||
{
|
||||
_logger.LogInformation("Automatic Task is {0} and will be canceled.", Entrypoint.AutomaticTaskState);
|
||||
Entrypoint.CancelAutomaticTask();
|
||||
}
|
||||
|
||||
_logger.LogInformation("Scheduled Task is starting");
|
||||
Plugin.Instance!.AnalyzerTaskIsRunning = true;
|
||||
|
@ -73,6 +73,11 @@ public class DetectIntrosCreditsTask : IScheduledTask
|
||||
{
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
else if (Plugin.Instance!.AnalyzerTaskIsRunning && Entrypoint.AutomaticTaskState == TaskState.Running)
|
||||
{
|
||||
_logger.LogInformation("Automatic Task is {0} and will be canceled.", Entrypoint.AutomaticTaskState);
|
||||
Entrypoint.CancelAutomaticTask();
|
||||
}
|
||||
|
||||
_logger.LogInformation("Scheduled Task is starting");
|
||||
Plugin.Instance!.AnalyzerTaskIsRunning = true;
|
||||
|
@ -73,6 +73,11 @@ public class DetectIntrosTask : IScheduledTask
|
||||
{
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
else if (Plugin.Instance!.AnalyzerTaskIsRunning && Entrypoint.AutomaticTaskState == TaskState.Running)
|
||||
{
|
||||
_logger.LogInformation("Automatic Task is {0} and will be canceled.", Entrypoint.AutomaticTaskState);
|
||||
Entrypoint.CancelAutomaticTask();
|
||||
}
|
||||
|
||||
_logger.LogInformation("Scheduled Task is starting");
|
||||
Plugin.Instance!.AnalyzerTaskIsRunning = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user