mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-17 21:26:22 -04:00
Queue Manual Import commands at high priority
(cherry picked from commit 64c6a8879beb1b17122c8f6f74bf7b3cf4dd1570)
This commit is contained in:
@@ -7,6 +7,7 @@ using NzbDrone.Common.Composition;
|
||||
using NzbDrone.Common.Serializer;
|
||||
using NzbDrone.Common.TPL;
|
||||
using NzbDrone.Core.Datastore.Events;
|
||||
using NzbDrone.Core.MediaFiles.MovieImport.Manual;
|
||||
using NzbDrone.Core.Messaging.Commands;
|
||||
using NzbDrone.Core.Messaging.Events;
|
||||
using NzbDrone.Core.ProgressMessaging;
|
||||
@@ -59,6 +60,9 @@ namespace Radarr.Api.V3.Commands
|
||||
using (var reader = new StreamReader(Request.Body))
|
||||
{
|
||||
var body = reader.ReadToEnd();
|
||||
var priority = commandType == typeof(ManualImportCommand)
|
||||
? CommandPriority.High
|
||||
: CommandPriority.Normal;
|
||||
|
||||
dynamic command = STJson.Deserialize(body, commandType);
|
||||
|
||||
@@ -67,7 +71,8 @@ namespace Radarr.Api.V3.Commands
|
||||
command.SendUpdatesToClient = true;
|
||||
command.ClientUserAgent = Request.Headers["UserAgent"];
|
||||
|
||||
var trackedCommand = _commandQueueManager.Push(command, CommandPriority.Normal, CommandTrigger.Manual);
|
||||
var trackedCommand = _commandQueueManager.Push(command, priority, CommandTrigger.Manual);
|
||||
|
||||
return Created(trackedCommand.Id);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user