Limit the scope of automatic scanning (#116)
* Add temporary scope limit for auto * Fix a missing credits variable rename * Add some extra padding to notes * Only use path limits when filled in
This commit is contained in:
parent
26d9c76d2f
commit
6cc69fc0ee
@ -1,3 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using MediaBrowser.Model.Plugins;
|
||||
|
||||
@ -27,6 +28,11 @@ public class PluginConfiguration : BasePluginConfiguration
|
||||
/// </summary>
|
||||
public string SelectedLibraries { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Gets a temporary limitation on file paths to be analyzed. Should be empty when automatic scan is idle.
|
||||
/// </summary>
|
||||
public IList<string> PathRestrictions { get; } = new List<string>();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether to scan for intros during a scheduled task.
|
||||
/// </summary>
|
||||
|
@ -46,8 +46,8 @@
|
||||
|
||||
<div class="fieldDescription">
|
||||
If enabled, credits will be automatically analyzed for new media
|
||||
</div>
|
||||
<div class="fieldDescription">
|
||||
<br />
|
||||
<br />
|
||||
Note: Not selecting at least one automatic detection type will disable automatic scans. To configure the scheduled task, see <a is="emby-linkbutton" class="button-link" href="scheduledtasks.html">scheduled tasks</a>.
|
||||
</div>
|
||||
</div>
|
||||
@ -61,6 +61,7 @@
|
||||
<div class="fieldDescription">
|
||||
If checked, season 0 (specials / extras) will be included in analysis.
|
||||
<br />
|
||||
<br />
|
||||
Note: Shows containing both a specials and extra folder will identify extras as season 0
|
||||
and ignore specials, regardless of this setting.
|
||||
</div>
|
||||
|
@ -148,6 +148,8 @@ public class Entrypoint : IHostedService, IDisposable
|
||||
return;
|
||||
}
|
||||
|
||||
Plugin.Instance!.Configuration.PathRestrictions.Add(itemChangeEventArgs.Item.ContainingFolderPath);
|
||||
|
||||
StartTimer();
|
||||
}
|
||||
|
||||
@ -175,6 +177,8 @@ public class Entrypoint : IHostedService, IDisposable
|
||||
return;
|
||||
}
|
||||
|
||||
Plugin.Instance!.Configuration.PathRestrictions.Add(itemChangeEventArgs.Item.ContainingFolderPath);
|
||||
|
||||
StartTimer();
|
||||
}
|
||||
|
||||
@ -291,6 +295,7 @@ public class Entrypoint : IHostedService, IDisposable
|
||||
}
|
||||
}
|
||||
|
||||
Plugin.Instance!.Configuration.PathRestrictions.Clear();
|
||||
_autoTaskCompletEvent.Set();
|
||||
_cancellationTokenSource = null;
|
||||
|
||||
|
@ -157,6 +157,14 @@ public class QueueManager
|
||||
continue;
|
||||
}
|
||||
|
||||
if (Plugin.Instance!.Configuration.PathRestrictions.Count > 0)
|
||||
{
|
||||
if (!Plugin.Instance!.Configuration.PathRestrictions.Contains(item.ContainingFolderPath))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
QueueEpisode(episode);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user