mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-11-01 00:12:30 +01:00
37 lines
881 B
C#
37 lines
881 B
C#
using System;
|
|
using System.Linq;
|
|
using NzbDrone.Core.Model.Notification;
|
|
using NzbDrone.Core.Providers;
|
|
|
|
namespace NzbDrone.Core.Jobs
|
|
{
|
|
public class UpdateSceneMappingsJob : IJob
|
|
{
|
|
private readonly SceneMappingProvider _sceneNameMappingProvider;
|
|
|
|
public UpdateSceneMappingsJob(SceneMappingProvider sceneNameMappingProvider)
|
|
{
|
|
_sceneNameMappingProvider = sceneNameMappingProvider;
|
|
}
|
|
|
|
public UpdateSceneMappingsJob()
|
|
{
|
|
|
|
}
|
|
|
|
public string Name
|
|
{
|
|
get { return "Update Scene Mappings"; }
|
|
}
|
|
|
|
public TimeSpan DefaultInterval
|
|
{
|
|
get { return TimeSpan.FromHours(12); }
|
|
}
|
|
|
|
public virtual void Start(ProgressNotification notification, dynamic options)
|
|
{
|
|
_sceneNameMappingProvider.UpdateMappings();
|
|
}
|
|
}
|
|
} |