mirror of https://github.com/Sonarr/Sonarr
Fixed: Manual refresh of all series will refresh every series, including ended series
This commit is contained in:
parent
81e80d5575
commit
1b18baca44
|
@ -21,7 +21,10 @@ namespace NzbDrone.Api.Commands
|
||||||
private readonly IContainer _container;
|
private readonly IContainer _container;
|
||||||
private readonly ITrackCommands _trackCommands;
|
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)
|
: base(signalRBroadcaster)
|
||||||
{
|
{
|
||||||
_commandExecutor = commandExecutor;
|
_commandExecutor = commandExecutor;
|
||||||
|
@ -48,6 +51,7 @@ namespace NzbDrone.Api.Commands
|
||||||
.Equals(commandResource.Name, StringComparison.InvariantCultureIgnoreCase));
|
.Equals(commandResource.Name, StringComparison.InvariantCultureIgnoreCase));
|
||||||
|
|
||||||
dynamic command = Request.Body.FromJson(commandType);
|
dynamic command = Request.Body.FromJson(commandType);
|
||||||
|
command.Manual = true;
|
||||||
|
|
||||||
var trackedCommand = (Command)_commandExecutor.PublishCommandAsync(command);
|
var trackedCommand = (Command)_commandExecutor.PublishCommandAsync(command);
|
||||||
return trackedCommand.Id;
|
return trackedCommand.Id;
|
||||||
|
|
|
@ -15,7 +15,7 @@ namespace NzbDrone.Core.Messaging.Commands
|
||||||
public CommandStatus State { get; private set; }
|
public CommandStatus State { get; private set; }
|
||||||
public DateTime StateChangeTime { get; private set; }
|
public DateTime StateChangeTime { get; private set; }
|
||||||
|
|
||||||
public virtual bool SendUpdatesToClient
|
public virtual Boolean SendUpdatesToClient
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
|
@ -31,10 +31,11 @@ namespace NzbDrone.Core.Messaging.Commands
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Boolean Manual { get; set; }
|
||||||
public Exception Exception { get; private 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; }
|
public DateTime? LastExecutionTime { get; set; }
|
||||||
|
|
||||||
protected Command()
|
protected Command()
|
||||||
|
@ -43,6 +44,7 @@ namespace NzbDrone.Core.Messaging.Commands
|
||||||
StateChangeTime = DateTime.UtcNow;
|
StateChangeTime = DateTime.UtcNow;
|
||||||
State = CommandStatus.Pending;
|
State = CommandStatus.Pending;
|
||||||
_stopWatch = new StopWatch();
|
_stopWatch = new StopWatch();
|
||||||
|
Manual = false;
|
||||||
|
|
||||||
lock (Mutex)
|
lock (Mutex)
|
||||||
{
|
{
|
||||||
|
|
|
@ -138,7 +138,7 @@ namespace NzbDrone.Core.Tv
|
||||||
|
|
||||||
foreach (var series in allSeries)
|
foreach (var series in allSeries)
|
||||||
{
|
{
|
||||||
if (_checkIfSeriesShouldBeRefreshed.ShouldRefresh(series))
|
if (message.Manual || _checkIfSeriesShouldBeRefreshed.ShouldRefresh(series))
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue