mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-11 15:47:09 -07:00
Moved source code under src folder - massive change
This commit is contained in:
parent
2fc8123d6b
commit
5bf0e197ec
1499 changed files with 1054 additions and 1444 deletions
32
src/NzbDrone.Api/Queue/QueueModule.cs
Normal file
32
src/NzbDrone.Api/Queue/QueueModule.cs
Normal file
|
@ -0,0 +1,32 @@
|
|||
using System.Collections.Generic;
|
||||
using NzbDrone.Core.Datastore.Events;
|
||||
using NzbDrone.Core.Download;
|
||||
using NzbDrone.Core.Messaging.Commands;
|
||||
using NzbDrone.Core.Messaging.Events;
|
||||
using NzbDrone.Core.Queue;
|
||||
|
||||
namespace NzbDrone.Api.Queue
|
||||
{
|
||||
public class QueueModule : NzbDroneRestModuleWithSignalR<QueueResource, Core.Queue.Queue>,
|
||||
IHandle<UpdateQueueEvent>
|
||||
{
|
||||
private readonly IQueueService _queueService;
|
||||
|
||||
public QueueModule(ICommandExecutor commandExecutor, IQueueService queueService)
|
||||
: base(commandExecutor)
|
||||
{
|
||||
_queueService = queueService;
|
||||
GetResourceAll = GetQueue;
|
||||
}
|
||||
|
||||
private List<QueueResource> GetQueue()
|
||||
{
|
||||
return ToListResource(_queueService.GetQueue);
|
||||
}
|
||||
|
||||
public void Handle(UpdateQueueEvent message)
|
||||
{
|
||||
BroadcastResourceChange(ModelAction.Sync);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue