Fixed: Manual refresh of all series will refresh every series, including ended series

This commit is contained in:
Mark McDowall 2014-09-10 23:49:25 -07:00
parent 81e80d5575
commit 1b18baca44
3 changed files with 11 additions and 5 deletions

View File

@ -21,7 +21,10 @@ namespace NzbDrone.Api.Commands
private readonly IContainer _container;
private readonly ITrackCommands _trackCommands;
public CommandModule(ICommandExecutor commandExecutor,IBroadcastSignalRMessage signalRBroadcaster, IContainer container, ITrackCommands trackCommands)
public CommandModule(ICommandExecutor commandExecutor,
IBroadcastSignalRMessage signalRBroadcaster,
IContainer container,
ITrackCommands trackCommands)
: base(signalRBroadcaster)
{
_commandExecutor = commandExecutor;
@ -48,6 +51,7 @@ namespace NzbDrone.Api.Commands
.Equals(commandResource.Name, StringComparison.InvariantCultureIgnoreCase));
dynamic command = Request.Body.FromJson(commandType);
command.Manual = true;
var trackedCommand = (Command)_commandExecutor.PublishCommandAsync(command);
return trackedCommand.Id;

View File

@ -15,7 +15,7 @@ namespace NzbDrone.Core.Messaging.Commands
public CommandStatus State { get; private set; }
public DateTime StateChangeTime { get; private set; }
public virtual bool SendUpdatesToClient
public virtual Boolean SendUpdatesToClient
{
get
{
@ -31,10 +31,11 @@ namespace NzbDrone.Core.Messaging.Commands
}
}
public Boolean Manual { get; set; }
public Exception Exception { get; private set; }
public string Message { get; private set; }
public String Message { get; private set; }
public string Name { get; private set; }
public String Name { get; private set; }
public DateTime? LastExecutionTime { get; set; }
protected Command()
@ -43,6 +44,7 @@ namespace NzbDrone.Core.Messaging.Commands
StateChangeTime = DateTime.UtcNow;
State = CommandStatus.Pending;
_stopWatch = new StopWatch();
Manual = false;
lock (Mutex)
{

View File

@ -138,7 +138,7 @@ namespace NzbDrone.Core.Tv
foreach (var series in allSeries)
{
if (_checkIfSeriesShouldBeRefreshed.ShouldRefresh(series))
if (message.Manual || _checkIfSeriesShouldBeRefreshed.ShouldRefresh(series))
{
try
{