mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-21 05:53:33 -07:00
moved jobs around again ;)
This commit is contained in:
parent
50674d388c
commit
568d4b8eeb
29 changed files with 70 additions and 121 deletions
52
NzbDrone.Core/Jobs/Implementations/XemUpdateJob.cs
Normal file
52
NzbDrone.Core/Jobs/Implementations/XemUpdateJob.cs
Normal file
|
@ -0,0 +1,52 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using NLog;
|
||||
using NzbDrone.Core.Model.Notification;
|
||||
using NzbDrone.Core.Providers;
|
||||
|
||||
namespace NzbDrone.Core.Jobs.Implementations
|
||||
{
|
||||
public class XemUpdateJob : IJob
|
||||
{
|
||||
private readonly XemProvider _xemProvider;
|
||||
|
||||
private static readonly Logger _logger = LogManager.GetCurrentClassLogger();
|
||||
|
||||
public XemUpdateJob(XemProvider xemProvider)
|
||||
{
|
||||
_xemProvider = xemProvider;
|
||||
}
|
||||
|
||||
public XemUpdateJob()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public string Name
|
||||
{
|
||||
get { return "XEM Update"; }
|
||||
}
|
||||
|
||||
public TimeSpan DefaultInterval
|
||||
{
|
||||
get { return TimeSpan.FromHours(12); }
|
||||
}
|
||||
|
||||
public virtual void Start(ProgressNotification notification, dynamic options)
|
||||
{
|
||||
if (options == null || options.SeriesId == 0)
|
||||
{
|
||||
_logger.Trace("Starting XEM Update for all series");
|
||||
_xemProvider.UpdateMappings();
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
_logger.Trace("Starting XEM Update for series: {0}", options.SeriesId);
|
||||
_xemProvider.UpdateMappings((int)options.SeriesId);
|
||||
}
|
||||
|
||||
_logger.Trace("XEM Update complete");
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue