mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-05 10:32:35 +01:00
36 lines
889 B
C#
36 lines
889 B
C#
using System.Linq;
|
|
using NzbDrone.Core.Model.Notification;
|
|
using NzbDrone.Core.Providers;
|
|
|
|
namespace NzbDrone.Core.Jobs
|
|
{
|
|
public abstract class UpdateSceneMappingsJob : IJob
|
|
{
|
|
private readonly SceneMappingProvider _sceneNameMappingProvider;
|
|
|
|
public UpdateSceneMappingsJob(SceneMappingProvider sceneNameMappingProvider)
|
|
{
|
|
_sceneNameMappingProvider = sceneNameMappingProvider;
|
|
}
|
|
|
|
public UpdateSceneMappingsJob()
|
|
{
|
|
|
|
}
|
|
|
|
public string Name
|
|
{
|
|
get { return "Update Scene Mappings"; }
|
|
}
|
|
|
|
public int DefaultInterval
|
|
{
|
|
get { return 720; } //Every 12 hours
|
|
}
|
|
|
|
public virtual void Start(ProgressNotification notification, int targetId, int secondaryTargetId)
|
|
{
|
|
_sceneNameMappingProvider.UpdateMappings();
|
|
}
|
|
}
|
|
} |