1
0
Fork 0
mirror of https://github.com/lidarr/Lidarr synced 2024-12-24 16:51:58 +00:00

Fixed: Refreshing individual series incorrectly delayed the schedule task.

fixes #720
This commit is contained in:
Taloth Saldono 2015-07-31 18:26:06 +02:00
parent ecb4835a16
commit 44e6c46337
4 changed files with 27 additions and 3 deletions

View file

@ -13,11 +13,19 @@ public override bool SendUpdatesToClient
return true;
}
}
public override bool UpdateScheduledTask
{
get
{
return Type == BackupType.Scheduled;
}
}
}
public enum BackupType
{
Scheduled = 0 ,
Scheduled = 0,
Manual = 1,
Update = 2
}

View file

@ -127,7 +127,7 @@ public void Handle(CommandExecutedEvent message)
{
var scheduledTask = _scheduledTaskRepository.All().SingleOrDefault(c => c.TypeName == message.Command.Body.GetType().FullName);
if (scheduledTask != null)
if (scheduledTask != null && message.Command.Body.UpdateScheduledTask)
{
_logger.Trace("Updating last run time for: {0}", scheduledTask.TypeName);
_scheduledTaskRepository.SetLastExecutionTime(scheduledTask.Id, DateTime.UtcNow);

View file

@ -4,7 +4,7 @@ namespace NzbDrone.Core.Messaging.Commands
{
public abstract class Command
{
public virtual Boolean SendUpdatesToClient
public virtual bool SendUpdatesToClient
{
get
{
@ -12,6 +12,14 @@ public virtual Boolean SendUpdatesToClient
}
}
public virtual bool UpdateScheduledTask
{
get
{
return true;
}
}
public virtual string CompletionMessage
{
get

View file

@ -22,5 +22,13 @@ public override bool SendUpdatesToClient
return true;
}
}
public override bool UpdateScheduledTask
{
get
{
return !SeriesId.HasValue;
}
}
}
}