|
|
@ -3,6 +3,7 @@ using System.Collections.Generic;
|
|
|
|
using System.Linq;
|
|
|
|
using System.Linq;
|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
using NzbDrone.Common.Extensions;
|
|
|
|
using NzbDrone.Common.Extensions;
|
|
|
|
|
|
|
|
using NzbDrone.Core.Blocklisting;
|
|
|
|
using NzbDrone.Core.Datastore;
|
|
|
|
using NzbDrone.Core.Datastore;
|
|
|
|
using NzbDrone.Core.Datastore.Events;
|
|
|
|
using NzbDrone.Core.Datastore.Events;
|
|
|
|
using NzbDrone.Core.Download;
|
|
|
|
using NzbDrone.Core.Download;
|
|
|
@ -33,6 +34,7 @@ namespace Radarr.Api.V3.Queue
|
|
|
|
private readonly IFailedDownloadService _failedDownloadService;
|
|
|
|
private readonly IFailedDownloadService _failedDownloadService;
|
|
|
|
private readonly IIgnoredDownloadService _ignoredDownloadService;
|
|
|
|
private readonly IIgnoredDownloadService _ignoredDownloadService;
|
|
|
|
private readonly IProvideDownloadClient _downloadClientProvider;
|
|
|
|
private readonly IProvideDownloadClient _downloadClientProvider;
|
|
|
|
|
|
|
|
private readonly IBlocklistService _blocklistService;
|
|
|
|
|
|
|
|
|
|
|
|
public QueueController(IBroadcastSignalRMessage broadcastSignalRMessage,
|
|
|
|
public QueueController(IBroadcastSignalRMessage broadcastSignalRMessage,
|
|
|
|
IQueueService queueService,
|
|
|
|
IQueueService queueService,
|
|
|
@ -41,7 +43,8 @@ namespace Radarr.Api.V3.Queue
|
|
|
|
ITrackedDownloadService trackedDownloadService,
|
|
|
|
ITrackedDownloadService trackedDownloadService,
|
|
|
|
IFailedDownloadService failedDownloadService,
|
|
|
|
IFailedDownloadService failedDownloadService,
|
|
|
|
IIgnoredDownloadService ignoredDownloadService,
|
|
|
|
IIgnoredDownloadService ignoredDownloadService,
|
|
|
|
IProvideDownloadClient downloadClientProvider)
|
|
|
|
IProvideDownloadClient downloadClientProvider,
|
|
|
|
|
|
|
|
IBlocklistService blocklistService)
|
|
|
|
: base(broadcastSignalRMessage)
|
|
|
|
: base(broadcastSignalRMessage)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_queueService = queueService;
|
|
|
|
_queueService = queueService;
|
|
|
@ -50,6 +53,7 @@ namespace Radarr.Api.V3.Queue
|
|
|
|
_failedDownloadService = failedDownloadService;
|
|
|
|
_failedDownloadService = failedDownloadService;
|
|
|
|
_ignoredDownloadService = ignoredDownloadService;
|
|
|
|
_ignoredDownloadService = ignoredDownloadService;
|
|
|
|
_downloadClientProvider = downloadClientProvider;
|
|
|
|
_downloadClientProvider = downloadClientProvider;
|
|
|
|
|
|
|
|
_blocklistService = blocklistService;
|
|
|
|
|
|
|
|
|
|
|
|
_qualityComparer = new QualityModelComparer(qualityProfileService.GetDefaultProfile(string.Empty));
|
|
|
|
_qualityComparer = new QualityModelComparer(qualityProfileService.GetDefaultProfile(string.Empty));
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -200,6 +204,7 @@ namespace Radarr.Api.V3.Queue
|
|
|
|
|
|
|
|
|
|
|
|
if (pendingRelease != null)
|
|
|
|
if (pendingRelease != null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
_blocklistService.Block(pendingRelease.RemoteMovie, "Pending release manually blocklisted");
|
|
|
|
_pendingReleaseService.RemovePendingQueueItems(pendingRelease.Id);
|
|
|
|
_pendingReleaseService.RemovePendingQueueItems(pendingRelease.Id);
|
|
|
|
|
|
|
|
|
|
|
|
return null;
|
|
|
|
return null;
|
|
|
|