1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-25 22:46:31 -04:00

Add v5 queue endpoints

This commit is contained in:
Mark McDowall
2025-04-28 15:58:41 -07:00
parent 37cb978f18
commit 642f4f97bc
29 changed files with 1597 additions and 43 deletions
@@ -10,16 +10,17 @@ using NzbDrone.SignalR;
using Sonarr.Http;
using Sonarr.Http.REST;
#pragma warning disable CS0612
namespace Sonarr.Api.V3.Queue
{
[V3ApiController("queue/details")]
public class QueueDetailsController : RestControllerWithSignalR<QueueResource, NzbDrone.Core.Queue.Queue>,
IHandle<QueueUpdatedEvent>, IHandle<PendingReleasesUpdatedEvent>
IHandle<ObsoleteQueueUpdatedEvent>, IHandle<PendingReleasesUpdatedEvent>
{
private readonly IQueueService _queueService;
private readonly IObsoleteQueueService _queueService;
private readonly IPendingReleaseService _pendingReleaseService;
public QueueDetailsController(IBroadcastSignalRMessage broadcastSignalRMessage, IQueueService queueService, IPendingReleaseService pendingReleaseService)
public QueueDetailsController(IBroadcastSignalRMessage broadcastSignalRMessage, IObsoleteQueueService queueService, IPendingReleaseService pendingReleaseService)
: base(broadcastSignalRMessage)
{
_queueService = queueService;
@@ -59,7 +60,7 @@ namespace Sonarr.Api.V3.Queue
}
[NonAction]
public void Handle(QueueUpdatedEvent message)
public void Handle(ObsoleteQueueUpdatedEvent message)
{
BroadcastResourceChange(ModelAction.Sync);
}
@@ -71,3 +72,4 @@ namespace Sonarr.Api.V3.Queue
}
}
}
#pragma warning restore CS0612