From 7b59173e2458d22d2a708a3717e4da85bbc8c495 Mon Sep 17 00:00:00 2001 From: Benjamin Harder Date: Sun, 17 Mar 2024 12:42:04 +0100 Subject: [PATCH] Adding protection across all types of removal --- README.md | 16 +++++++++------- src/remove_failed.py | 4 ++-- src/remove_missing_files.py | 4 ++-- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 269f426..977b408 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,8 @@ You can find a sample docker-compose.yml in the docker folder. - The feature that allows to protect downloads from removal (NO_STALLED_REMOVAL_QBIT_TAG) does not work - If you see strange errors such as "found 10 / 3 times", consider turning on the setting "Reject Blocklisted Torrent Hashes While Grabbing" on indexer-level (available in the nightly versions of the *arr apps) - When broken torrents are removed the files belonging to them are deleted +- Across all removal types: A new download from another source is automatically added by radarr/sonarr/lidarr/readarr (if available) +- If you use qBittorrent and none of your torrents get removed and the verbose logs tell that all torrents are protected by the NO_STALLED_REMOVAL_QBIT_TAG even if they are not, you may be using a qBittorrent version that has problems with API calls and you may want to consider switching to a different qBit image (see [https://github.com/ManiMatter/decluttarr/issues/56](Not removing any torrents)) ## Getting started There's two ways to run this: @@ -136,6 +138,7 @@ Steers which type of cleaning is applied to the downloads queue **REMOVE_FAILED** - Steers whether failed downloads with no connections are removed from the queue - These downloads are not added to the blocklist +- A new download from another source is automatically added by radarr/sonarr/lidarr/readarr (if available) - Type: Boolean - Permissible Values: True, False - Is Mandatory: No (Defaults to False) @@ -143,7 +146,6 @@ Steers which type of cleaning is applied to the downloads queue **REMOVE_STALLED** - Steers whether stalled downloads with no connections are removed from the queue - These downloads are added to the blocklist, so that they are not re-requested in the future -- A new download from another source is automatically added by radarr/sonarr/lidarr/readarr (if available) - Type: Boolean - Permissible Values: True, False - Is Mandatory: No (Defaults to False) @@ -183,7 +185,6 @@ Steers which type of cleaning is applied to the downloads queue **REMOVE_SLOW** - Steers whether slow downloads are removed from the queue - Slow downloads are added to the blocklist, so that they are not re-requested in the future -- A new download from another source is automatically added by sonarr/radarr/readarr (if available) - Type: Boolean - Permissible Values: True, False - Is Mandatory: No (Defaults to False) @@ -203,17 +204,18 @@ Steers which type of cleaning is applied to the downloads queue **NO_STALLED_REMOVAL_QBIT_TAG** - Downloads in qBittorrent tagged with this tag will not be removed -- Applies to the following: Slow, Stalled, Unmonitored, Orphans, Metadata Missing -- These will continue to be removed (since considered broken): Failed, Files Missing +- Feature is not available when not using qBittorrent as torrent manager +- Applies to all types of removal (ie. nothing will be removed automatically by decluttarr) +- Note: You may want to try "force recheck" to get your stuck torrents manually back up and running - Tag is automatically created in qBittorrent (required qBittorrent is reachable on `QBITTORRENT_URL`) -- Also protects unmonitored downloads from being removed (relevant for multi-season packs) +- Important: Also protects unmonitored downloads from being removed (relevant for multi-season packs) - Type: String - Is Mandatory: No (Defaults to `Don't Kill`) **IGNORE_PRIVATE_TRACKERS** - Private torrents in qBittorrent will not be removed from the queue if this is set to true -- Applies to the following: Slow, Stalled, Unmonitored, Orphans, Metadata Missing -- These will continue to be removed (since considered broken): Failed, Files Missing +- Applies to all types of removal (ie. nothing will be removed automatically by decluttarr) +- Note: You may want to try "force recheck" to get your stuck torrents manually back up and running - Type: Boolean - Permissible Values: True, False - Is Mandatory: No (Defaults to True) diff --git a/src/remove_failed.py b/src/remove_failed.py index a140559..88ad344 100644 --- a/src/remove_failed.py +++ b/src/remove_failed.py @@ -18,8 +18,8 @@ async def remove_failed(settings_dict, BASE_URL, API_KEY, NAME, deleted_download affectedItems.append(queueItem) affectedItems = await execute_checks(settings_dict, affectedItems, failType, BASE_URL, API_KEY, NAME, deleted_downloads, defective_tracker, privateDowloadIDs, protectedDownloadIDs, addToBlocklist = False, - doPrivateTrackerCheck = False, - doProtectedDownloadCheck = False, + doPrivateTrackerCheck = True, + doProtectedDownloadCheck = True, doPermittedAttemptsCheck = False) return len(affectedItems) except Exception as error: diff --git a/src/remove_missing_files.py b/src/remove_missing_files.py index 98c1349..bdac711 100644 --- a/src/remove_missing_files.py +++ b/src/remove_missing_files.py @@ -20,8 +20,8 @@ async def remove_missing_files(settings_dict, BASE_URL, API_KEY, NAME, deleted_d affectedItems.append(queueItem) affectedItems = await execute_checks(settings_dict, affectedItems, failType, BASE_URL, API_KEY, NAME, deleted_downloads, defective_tracker, privateDowloadIDs, protectedDownloadIDs, addToBlocklist = False, - doPrivateTrackerCheck = False, - doProtectedDownloadCheck = False, + doPrivateTrackerCheck = True, + doProtectedDownloadCheck = True, doPermittedAttemptsCheck = False) return len(affectedItems) except Exception as error: