From a610a9c4b97683f6f867d042941b087b1ab45c31 Mon Sep 17 00:00:00 2001 From: Benjamin Harder Date: Mon, 8 Apr 2024 21:59:46 +0200 Subject: [PATCH] Small bugfix --- src/utils/shared.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/utils/shared.py b/src/utils/shared.py index c21f857..747337e 100644 --- a/src/utils/shared.py +++ b/src/utils/shared.py @@ -75,14 +75,14 @@ async def execute_checks(settingsDict, affectedItems, failType, BASE_URL, API_KE if doPermittedAttemptsCheck: affectedItems = permittedAttemptsCheck(settingsDict, affectedItems, failType, BASE_URL, defective_tracker) - # Checks whether when removing the queue item from the *arr app the torrent should be kept - removeFromClient = True - if 'keepTorrentForPrivateTrackers' in extraParameters: - if settingsDict['IGNORE_PRIVATE_TRACKERS'] and affectedItem['downloadId'] in privateDowloadIDs: - removeFromClient = False - # Deletes all downloads that have not survived the checks for affectedItem in affectedItems: + # Checks whether when removing the queue item from the *arr app the torrent should be kept + removeFromClient = True + if 'keepTorrentForPrivateTrackers' in extraParameters: + if settingsDict['IGNORE_PRIVATE_TRACKERS'] and affectedItem['downloadId'] in privateDowloadIDs: + removeFromClient = False + # Removes the queue item await remove_download(settingsDict, BASE_URL, API_KEY, affectedItem, failType, addToBlocklist, deleted_downloads, removeFromClient) # Exit Logs if settingsDict['LOG_LEVEL'] == 'DEBUG':