mirror of
https://github.com/lidarr/Lidarr
synced 2025-01-03 05:25:10 +00:00
Fixed: Manual adding to blocklist
This commit is contained in:
parent
feee1881b2
commit
5f725a0a4d
2 changed files with 8 additions and 8 deletions
|
@ -18,7 +18,7 @@ public BlocklistController(IBlocklistService blocklistService)
|
|||
}
|
||||
|
||||
[HttpGet]
|
||||
public PagingResource<BlocklistResource> GetBlacklist()
|
||||
public PagingResource<BlocklistResource> GetBlocklist()
|
||||
{
|
||||
var pagingResource = Request.ReadPagingResourceFromRequest<BlocklistResource>();
|
||||
var pagingSpec = pagingResource.MapToPagingSpec<BlocklistResource, NzbDrone.Core.Blocklisting.Blocklist>("date", SortDirection.Descending);
|
||||
|
|
|
@ -59,9 +59,9 @@ public override QueueResource GetResourceById(int id)
|
|||
}
|
||||
|
||||
[RestDeleteById]
|
||||
public void RemoveAction(int id, bool removeFromClient = true, bool blacklist = false, bool skipReDownload = false)
|
||||
public void RemoveAction(int id, bool removeFromClient = true, bool blocklist = false, bool skipReDownload = false)
|
||||
{
|
||||
var trackedDownload = Remove(id, removeFromClient, blacklist, skipReDownload);
|
||||
var trackedDownload = Remove(id, removeFromClient, blocklist, skipReDownload);
|
||||
|
||||
if (trackedDownload != null)
|
||||
{
|
||||
|
@ -70,13 +70,13 @@ public void RemoveAction(int id, bool removeFromClient = true, bool blacklist =
|
|||
}
|
||||
|
||||
[HttpDelete("bulk")]
|
||||
public object RemoveMany([FromBody] QueueBulkResource resource, [FromQuery] bool removeFromClient = true, [FromQuery] bool blacklist = false, [FromQuery] bool skipReDownload = false)
|
||||
public object RemoveMany([FromBody] QueueBulkResource resource, [FromQuery] bool removeFromClient = true, [FromQuery] bool blocklist = false, [FromQuery] bool skipReDownload = false)
|
||||
{
|
||||
var trackedDownloadIds = new List<string>();
|
||||
|
||||
foreach (var id in resource.Ids)
|
||||
{
|
||||
var trackedDownload = Remove(id, removeFromClient, blacklist, skipReDownload);
|
||||
var trackedDownload = Remove(id, removeFromClient, blocklist, skipReDownload);
|
||||
|
||||
if (trackedDownload != null)
|
||||
{
|
||||
|
@ -191,7 +191,7 @@ public PagingResource<QueueResource> GetQueue(bool includeUnknownArtistItems = f
|
|||
}
|
||||
}
|
||||
|
||||
private TrackedDownload Remove(int id, bool removeFromClient, bool blacklist, bool skipReDownload)
|
||||
private TrackedDownload Remove(int id, bool removeFromClient, bool blocklist, bool skipReDownload)
|
||||
{
|
||||
var pendingRelease = _pendingReleaseService.FindPendingQueueItem(id);
|
||||
|
||||
|
@ -221,12 +221,12 @@ private TrackedDownload Remove(int id, bool removeFromClient, bool blacklist, bo
|
|||
downloadClient.RemoveItem(trackedDownload.DownloadItem.DownloadId, true);
|
||||
}
|
||||
|
||||
if (blacklist)
|
||||
if (blocklist)
|
||||
{
|
||||
_failedDownloadService.MarkAsFailed(trackedDownload.DownloadItem.DownloadId, skipReDownload);
|
||||
}
|
||||
|
||||
if (!removeFromClient && !blacklist)
|
||||
if (!removeFromClient && !blocklist)
|
||||
{
|
||||
if (!_ignoredDownloadService.IgnoreDownload(trackedDownload))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue