Fixed: Removing pending release without blocklisting

(cherry picked from commit 0c883f78862f88ff37cd5539da4f569fbe3c93ed)

Closes #4892
pull/4906/head
Bogdan 5 months ago
parent ed07f82218
commit 9560991327

@ -118,6 +118,7 @@ function RemoveQueueItemModal(props: RemoveQueueItemModalProps) {
{
key: 'blocklistAndSearch',
value: translate('BlocklistAndSearch'),
isDisabled: isPending,
hint: multipleSelected
? translate('BlocklistAndSearchMultipleHint')
: translate('BlocklistAndSearchHint'),
@ -130,7 +131,7 @@ function RemoveQueueItemModal(props: RemoveQueueItemModalProps) {
: translate('BlocklistOnlyHint'),
},
];
}, [multipleSelected]);
}, [isPending, multipleSelected]);
const handleRemovalMethodChange = useCallback(
({ value }: { value: RemovalMethod }) => {

@ -71,7 +71,7 @@ namespace Lidarr.Api.V1.Queue
if (pendingRelease != null)
{
Remove(pendingRelease);
Remove(pendingRelease, blocklist);
return;
}
@ -114,7 +114,7 @@ namespace Lidarr.Api.V1.Queue
foreach (var pendingRelease in pendingToRemove.DistinctBy(p => p.Id))
{
Remove(pendingRelease);
Remove(pendingRelease, blocklist);
}
foreach (var trackedDownload in trackedToRemove.DistinctBy(t => t.DownloadItem.DownloadId))
@ -263,9 +263,13 @@ namespace Lidarr.Api.V1.Queue
}
}
private void Remove(NzbDrone.Core.Queue.Queue pendingRelease)
private void Remove(NzbDrone.Core.Queue.Queue pendingRelease, bool blocklist)
{
_blocklistService.Block(pendingRelease.RemoteAlbum, "Pending release manually blocklisted");
if (blocklist)
{
_blocklistService.Block(pendingRelease.RemoteAlbum, "Pending release manually blocklisted");
}
_pendingReleaseService.RemovePendingQueueItems(pendingRelease.Id);
}

Loading…
Cancel
Save