mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-21 05:53:33 -07:00
SceneNaming is now stored on NzbDrone webserver.
Database will update every 12 hours from CSV on server.
This commit is contained in:
parent
6dda51d0e7
commit
ab2007cb6f
11 changed files with 312 additions and 159 deletions
42
NzbDrone.Core/Providers/Jobs/UpdateSceneMappingsJob.cs
Normal file
42
NzbDrone.Core/Providers/Jobs/UpdateSceneMappingsJob.cs
Normal file
|
@ -0,0 +1,42 @@
|
|||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using NzbDrone.Core.Model.Notification;
|
||||
using NzbDrone.Core.Repository;
|
||||
|
||||
namespace NzbDrone.Core.Providers.Jobs
|
||||
{
|
||||
public class UpdateSceneMappingsJob : IJob
|
||||
{
|
||||
private readonly SceneNameMappingProvider _sceneNameMappingProvider;
|
||||
|
||||
public UpdateSceneMappingsJob(SceneNameMappingProvider 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)
|
||||
{
|
||||
notification.CurrentMessage = "Updating Scene Mappings";
|
||||
if (_sceneNameMappingProvider.UpdateMappings())
|
||||
notification.CurrentMessage = "Scene Mappings Completed";
|
||||
|
||||
else
|
||||
notification.CurrentMessage = "Scene Mappings Failed";
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue