|
|
@ -123,9 +123,19 @@ namespace NzbDrone.Core.Jobs
|
|
|
|
|
|
|
|
|
|
|
|
private int GetBackupInterval()
|
|
|
|
private int GetBackupInterval()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var interval = _configService.BackupInterval;
|
|
|
|
var intervalDays = _configService.BackupInterval;
|
|
|
|
|
|
|
|
|
|
|
|
return interval * 60 * 24;
|
|
|
|
if (intervalDays < 1)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
intervalDays = 1;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (intervalDays > 7)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
intervalDays = 7;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return intervalDays * 60 * 24;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private int GetRssSyncInterval()
|
|
|
|
private int GetRssSyncInterval()
|
|
|
@ -167,7 +177,7 @@ namespace NzbDrone.Core.Jobs
|
|
|
|
public void HandleAsync(ConfigSavedEvent message)
|
|
|
|
public void HandleAsync(ConfigSavedEvent message)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var rss = _scheduledTaskRepository.GetDefinition(typeof(RssSyncCommand));
|
|
|
|
var rss = _scheduledTaskRepository.GetDefinition(typeof(RssSyncCommand));
|
|
|
|
rss.Interval = _configService.RssSyncInterval;
|
|
|
|
rss.Interval = GetRssSyncInterval();
|
|
|
|
|
|
|
|
|
|
|
|
var importList = _scheduledTaskRepository.GetDefinition(typeof(ImportListSyncCommand));
|
|
|
|
var importList = _scheduledTaskRepository.GetDefinition(typeof(ImportListSyncCommand));
|
|
|
|
importList.Interval = GetImportListSyncInterval();
|
|
|
|
importList.Interval = GetImportListSyncInterval();
|
|
|
|