2011-04-20 01:20:20 +00:00
|
|
|
|
using System.Linq;
|
|
|
|
|
using NLog;
|
2011-04-20 07:44:13 +00:00
|
|
|
|
using NzbDrone.Core.Model.Notification;
|
2011-04-20 01:20:20 +00:00
|
|
|
|
|
2011-04-20 07:44:13 +00:00
|
|
|
|
namespace NzbDrone.Core.Providers.Jobs
|
2011-04-20 01:20:20 +00:00
|
|
|
|
{
|
2011-04-20 07:44:13 +00:00
|
|
|
|
public class RssSyncJob : IJob
|
2011-04-20 01:20:20 +00:00
|
|
|
|
{
|
|
|
|
|
private readonly IndexerProvider _indexerProvider;
|
|
|
|
|
|
|
|
|
|
private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
|
|
|
|
|
|
2011-04-20 07:44:13 +00:00
|
|
|
|
public RssSyncJob(IndexerProvider indexerProvider)
|
2011-04-20 01:20:20 +00:00
|
|
|
|
{
|
|
|
|
|
_indexerProvider = indexerProvider;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string Name
|
|
|
|
|
{
|
|
|
|
|
get { return "RSS Sync"; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int DefaultInterval
|
|
|
|
|
{
|
|
|
|
|
get { return 15; }
|
|
|
|
|
}
|
|
|
|
|
|
2011-04-20 07:44:13 +00:00
|
|
|
|
public void Start(ProgressNotification notification, int targetId)
|
2011-04-20 01:20:20 +00:00
|
|
|
|
{
|
|
|
|
|
Logger.Info("Doing Things!!!!");
|
|
|
|
|
|
|
|
|
|
var indexers = _indexerProvider.AllIndexers().Where(c => c.Enable);
|
|
|
|
|
|
|
|
|
|
foreach (var indexerSetting in indexers)
|
|
|
|
|
{
|
2011-04-20 07:44:13 +00:00
|
|
|
|
|
2011-04-20 01:20:20 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|