1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-23 02:05:27 +02:00
Sonarr/NzbDrone.Core/Jobs/Implementations/RssSyncJob.cs

35 lines
928 B
C#
Raw Normal View History

2013-03-05 08:37:33 +03:00
using System;
2013-02-24 09:48:52 +03:00
using NzbDrone.Core.Configuration;
2013-02-21 10:07:34 +03:00
using NzbDrone.Core.Indexers;
using NzbDrone.Core.Model.Notification;
2011-04-20 04:20:20 +03:00
2013-03-05 08:37:33 +03:00
namespace NzbDrone.Core.Jobs.Implementations
2011-04-20 04:20:20 +03:00
{
public class RssSyncJob : IJob
2011-04-20 04:20:20 +03:00
{
2013-04-23 09:06:05 +03:00
private readonly IRssSyncService _rssSyncServiceService;
2013-02-24 09:48:52 +03:00
private readonly IConfigService _configService;
2011-04-22 09:23:29 +03:00
2011-04-20 04:20:20 +03:00
2013-04-23 09:06:05 +03:00
public RssSyncJob(IRssSyncService rssSyncServiceService, IConfigService configService)
2011-04-20 04:20:20 +03:00
{
2013-04-23 09:06:05 +03:00
_rssSyncServiceService = rssSyncServiceService;
2013-02-24 09:48:52 +03:00
_configService = configService;
2011-04-20 04:20:20 +03:00
}
public string Name
{
get { return "RSS Sync"; }
}
public TimeSpan DefaultInterval
2011-04-20 04:20:20 +03:00
{
2013-02-24 09:48:52 +03:00
get { return TimeSpan.FromMinutes(_configService.RssSyncInterval); }
2011-04-20 04:20:20 +03:00
}
2012-09-10 22:04:17 +03:00
public void Start(ProgressNotification notification, dynamic options)
2011-04-20 04:20:20 +03:00
{
2013-04-23 09:06:05 +03:00
_rssSyncServiceService.Sync();
2011-04-20 04:20:20 +03:00
}
}
}