mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-18 21:35:51 -04:00
Command Equality ignores properties defined in Command
This commit is contained in:
@@ -26,6 +26,11 @@ namespace NzbDrone.Core.Messaging.Commands
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (xProperty.DeclaringType == typeof (Command))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
var yProperty = yProperties.Single(p => p.Name == xProperty.Name);
|
var yProperty = yProperties.Single(p => p.Name == xProperty.Name);
|
||||||
|
|
||||||
var xValue = xProperty.GetValue(x, null);
|
var xValue = xProperty.GetValue(x, null);
|
||||||
|
|||||||
@@ -58,8 +58,7 @@ namespace NzbDrone.Core.Messaging.Commands.Tracking
|
|||||||
|
|
||||||
public Command FindExisting(Command command)
|
public Command FindExisting(Command command)
|
||||||
{
|
{
|
||||||
return RunningCommands().Where(c => c.GetType() == command.GetType())
|
return RunningCommands().SingleOrDefault(t => CommandEqualityComparer.Instance.Equals(t, command));
|
||||||
.SingleOrDefault(t => CommandEqualityComparer.Instance.Equals(t, command));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Store(Command command)
|
public void Store(Command command)
|
||||||
|
|||||||
Reference in New Issue
Block a user