mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 18:57:39 -07:00
Added completely awesome JobProvider. extremely easy to do async/timer tasks with ui status/notification already plugged in.
This commit is contained in:
parent
b86dac57e1
commit
9028e498ca
27 changed files with 677 additions and 444 deletions
40
NzbDrone.Core/Providers/Jobs/RssSyncJob.cs
Normal file
40
NzbDrone.Core/Providers/Jobs/RssSyncJob.cs
Normal file
|
@ -0,0 +1,40 @@
|
|||
using System.Linq;
|
||||
using NLog;
|
||||
using NzbDrone.Core.Model.Notification;
|
||||
|
||||
namespace NzbDrone.Core.Providers.Jobs
|
||||
{
|
||||
public class RssSyncJob : IJob
|
||||
{
|
||||
private readonly IndexerProvider _indexerProvider;
|
||||
|
||||
private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
|
||||
|
||||
public RssSyncJob(IndexerProvider indexerProvider)
|
||||
{
|
||||
_indexerProvider = indexerProvider;
|
||||
}
|
||||
|
||||
public string Name
|
||||
{
|
||||
get { return "RSS Sync"; }
|
||||
}
|
||||
|
||||
public int DefaultInterval
|
||||
{
|
||||
get { return 15; }
|
||||
}
|
||||
|
||||
public void Start(ProgressNotification notification, int targetId)
|
||||
{
|
||||
Logger.Info("Doing Things!!!!");
|
||||
|
||||
var indexers = _indexerProvider.AllIndexers().Where(c => c.Enable);
|
||||
|
||||
foreach (var indexerSetting in indexers)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue