mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-14 00:53:57 -07:00
Better names, more info, not using events
This commit is contained in:
parent
bb103947a2
commit
3c632743a1
6 changed files with 107 additions and 74 deletions
|
@ -4,7 +4,7 @@ using Nancy;
|
|||
using NzbDrone.Api.Extensions;
|
||||
using NzbDrone.Common.Composition;
|
||||
using NzbDrone.Common.Messaging;
|
||||
using NzbDrone.Common.Messaging.Manager;
|
||||
using NzbDrone.Common.Messaging.Tracking;
|
||||
|
||||
namespace NzbDrone.Api.Commands
|
||||
{
|
||||
|
@ -12,13 +12,13 @@ namespace NzbDrone.Api.Commands
|
|||
{
|
||||
private readonly IMessageAggregator _messageAggregator;
|
||||
private readonly IContainer _container;
|
||||
private readonly IManageCommands _commandManager;
|
||||
private readonly ITrackCommands _trackCommands;
|
||||
|
||||
public CommandModule(IMessageAggregator messageAggregator, IContainer container, IManageCommands commandManager)
|
||||
public CommandModule(IMessageAggregator messageAggregator, IContainer container, ITrackCommands trackCommands)
|
||||
{
|
||||
_messageAggregator = messageAggregator;
|
||||
_container = container;
|
||||
_commandManager = commandManager;
|
||||
_trackCommands = trackCommands;
|
||||
|
||||
Post["/"] = x => RunCommand(ReadResourceFromRequest());
|
||||
Get["/"] = x => GetAllCommands();
|
||||
|
@ -39,7 +39,7 @@ namespace NzbDrone.Api.Commands
|
|||
|
||||
private Response GetAllCommands()
|
||||
{
|
||||
return _commandManager.Items.AsResponse();
|
||||
return _trackCommands.AllTracked.AsResponse();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue