mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-23 22:25:14 -04:00
Fixed: Blocklisting pending releases
Closes #4598 (cherry picked from commit 3f60e28c42d946691c4d44eb391b7888466538d9)
This commit is contained in:
committed by
Robin Dadswell
parent
a219b4a1b8
commit
86da4e87ea
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using NzbDrone.Common.Extensions;
|
||||
using NzbDrone.Core.Blocklisting;
|
||||
using NzbDrone.Core.Datastore;
|
||||
using NzbDrone.Core.Datastore.Events;
|
||||
using NzbDrone.Core.Download;
|
||||
@@ -33,6 +34,7 @@ namespace Radarr.Api.V3.Queue
|
||||
private readonly IFailedDownloadService _failedDownloadService;
|
||||
private readonly IIgnoredDownloadService _ignoredDownloadService;
|
||||
private readonly IProvideDownloadClient _downloadClientProvider;
|
||||
private readonly IBlocklistService _blocklistService;
|
||||
|
||||
public QueueController(IBroadcastSignalRMessage broadcastSignalRMessage,
|
||||
IQueueService queueService,
|
||||
@@ -41,7 +43,8 @@ namespace Radarr.Api.V3.Queue
|
||||
ITrackedDownloadService trackedDownloadService,
|
||||
IFailedDownloadService failedDownloadService,
|
||||
IIgnoredDownloadService ignoredDownloadService,
|
||||
IProvideDownloadClient downloadClientProvider)
|
||||
IProvideDownloadClient downloadClientProvider,
|
||||
IBlocklistService blocklistService)
|
||||
: base(broadcastSignalRMessage)
|
||||
{
|
||||
_queueService = queueService;
|
||||
@@ -50,6 +53,7 @@ namespace Radarr.Api.V3.Queue
|
||||
_failedDownloadService = failedDownloadService;
|
||||
_ignoredDownloadService = ignoredDownloadService;
|
||||
_downloadClientProvider = downloadClientProvider;
|
||||
_blocklistService = blocklistService;
|
||||
|
||||
_qualityComparer = new QualityModelComparer(qualityProfileService.GetDefaultProfile(string.Empty));
|
||||
}
|
||||
@@ -200,6 +204,7 @@ namespace Radarr.Api.V3.Queue
|
||||
|
||||
if (pendingRelease != null)
|
||||
{
|
||||
_blocklistService.Block(pendingRelease.RemoteMovie, "Pending release manually blocklisted");
|
||||
_pendingReleaseService.RemovePendingQueueItems(pendingRelease.Id);
|
||||
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user