Clear restrictions when overriding auto

This commit is contained in:
TwistedUmbrellaX 2024-04-16 14:01:48 -04:00
parent f36a2d9bec
commit 46d446718f
4 changed files with 13 additions and 0 deletions

View File

@ -206,6 +206,12 @@ public class Entrypoint : IServerEntryPoint
return;
}
// Unless user initiated, this is likely an overlap
if (Entrypoint.AutomaticTaskState == TaskState.Running)
{
return;
}
StartTimer();
}
@ -341,6 +347,7 @@ public class Entrypoint : IServerEntryPoint
{
if (!dispose)
{
Plugin.Instance!.Configuration.PathRestrictions.Clear();
_libraryManager.ItemAdded -= OnItemAdded;
_libraryManager.ItemUpdated -= OnItemModified;
_taskManager.TaskCompleted -= OnLibraryRefresh;

View File

@ -86,6 +86,8 @@ public class DetectCreditsTask : IScheduledTask
_logger.LogInformation("Scheduled Task is starting");
Plugin.Instance!.Configuration.PathRestrictions.Clear();
var baseCreditAnalyzer = new BaseItemAnalyzerTask(
AnalysisMode.Credits,
_loggerFactory.CreateLogger<DetectCreditsTask>(),

View File

@ -85,6 +85,8 @@ public class DetectIntrosCreditsTask : IScheduledTask
_logger.LogInformation("Scheduled Task is starting");
Plugin.Instance!.Configuration.PathRestrictions.Clear();
var baseIntroAnalyzer = new BaseItemAnalyzerTask(
AnalysisMode.Introduction,
_loggerFactory.CreateLogger<DetectIntrosCreditsTask>(),

View File

@ -85,6 +85,8 @@ public class DetectIntrosTask : IScheduledTask
_logger.LogInformation("Scheduled Task is starting");
Plugin.Instance!.Configuration.PathRestrictions.Clear();
var baseIntroAnalyzer = new BaseItemAnalyzerTask(
AnalysisMode.Introduction,
_loggerFactory.CreateLogger<DetectIntrosTask>(),