mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-13 16:43:58 -07:00
Commands return immediately and signalr is used to control the UI
This commit is contained in:
parent
772ab3c921
commit
c96ba5efd3
55 changed files with 439 additions and 238 deletions
|
@ -2,6 +2,7 @@
|
|||
using System.Linq;
|
||||
using Nancy;
|
||||
using NzbDrone.Api.Extensions;
|
||||
using NzbDrone.Api.Mapping;
|
||||
using NzbDrone.Common.Composition;
|
||||
using NzbDrone.Common.Messaging;
|
||||
using NzbDrone.Common.Messaging.Tracking;
|
||||
|
@ -32,9 +33,10 @@ namespace NzbDrone.Api.Commands
|
|||
.Equals(resource.Command, StringComparison.InvariantCultureIgnoreCase));
|
||||
|
||||
dynamic command = Request.Body.FromJson(commandType);
|
||||
_messageAggregator.PublishCommand(command);
|
||||
|
||||
return resource.AsResponse(HttpStatusCode.Created);
|
||||
var response = (TrackedCommand) _messageAggregator.PublishCommandAsync(command);
|
||||
|
||||
return response.AsResponse(HttpStatusCode.Created);
|
||||
}
|
||||
|
||||
private Response GetAllCommands()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue