mirror of
https://github.com/lidarr/Lidarr
synced 2024-12-28 18:47:52 +00:00
RSS Sync interval cannot be set to a 1-9 minutes (0 or 10+ only)
This commit is contained in:
parent
f5ddb36ebd
commit
ec413c13bd
1 changed files with 13 additions and 1 deletions
|
@ -67,7 +67,7 @@ public void Handle(ApplicationStartedEvent message)
|
|||
|
||||
new ScheduledTask
|
||||
{
|
||||
Interval = new [] { _configService.RssSyncInterval, 10 }.Max(),
|
||||
Interval = GetRssSyncInterval(),
|
||||
TypeName = typeof(RssSyncCommand).FullName
|
||||
},
|
||||
|
||||
|
@ -106,6 +106,18 @@ public void Handle(ApplicationStartedEvent message)
|
|||
}
|
||||
}
|
||||
|
||||
private int GetRssSyncInterval()
|
||||
{
|
||||
var interval = _configService.RssSyncInterval;
|
||||
|
||||
if (interval > 0 && interval < 10)
|
||||
{
|
||||
return 10;
|
||||
}
|
||||
|
||||
return interval;
|
||||
}
|
||||
|
||||
public void Handle(CommandExecutedEvent message)
|
||||
{
|
||||
var scheduledTask = _scheduledTaskRepository.All().SingleOrDefault(c => c.TypeName == message.Command.GetType().FullName);
|
||||
|
|
Loading…
Reference in a new issue