mirror of
https://github.com/Sonarr/Sonarr.git
synced 2025-01-25 11:13:39 +02:00
Fixed: Removing pending release without blocklisting
This commit is contained in:
parent
46c7de379c
commit
0c883f7886
@ -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 }) => {
|
||||
|
@ -77,7 +77,7 @@ namespace Sonarr.Api.V3.Queue
|
||||
|
||||
if (pendingRelease != null)
|
||||
{
|
||||
Remove(pendingRelease);
|
||||
Remove(pendingRelease, blocklist);
|
||||
|
||||
return;
|
||||
}
|
||||
@ -120,7 +120,7 @@ namespace Sonarr.Api.V3.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))
|
||||
@ -286,9 +286,13 @@ namespace Sonarr.Api.V3.Queue
|
||||
}
|
||||
}
|
||||
|
||||
private void Remove(NzbDrone.Core.Queue.Queue pendingRelease)
|
||||
private void Remove(NzbDrone.Core.Queue.Queue pendingRelease, bool blocklist)
|
||||
{
|
||||
_blocklistService.Block(pendingRelease.RemoteEpisode, "Pending release manually blocklisted");
|
||||
if (blocklist)
|
||||
{
|
||||
_blocklistService.Block(pendingRelease.RemoteEpisode, "Pending release manually blocklisted");
|
||||
}
|
||||
|
||||
_pendingReleaseService.RemovePendingQueueItems(pendingRelease.Id);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user