mirror of
https://github.com/ManiMatter/decluttarr.git
synced 2026-04-21 16:25:35 +02:00
Small cosmetics
This commit is contained in:
@@ -33,6 +33,7 @@ You can find a sample docker-compose.yml in the docker folder.
|
||||
- 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)
|
||||
- Sonarr/Radarr etc need to run in English, else torrents may not correctly be identified as stuck
|
||||
|
||||
## Getting started
|
||||
There's two ways to run this:
|
||||
|
||||
2
main.py
2
main.py
@@ -47,7 +47,7 @@ async def getProtectedAndPrivateFromQbit(settingsDict):
|
||||
qbitItem['is_private'] = qbitItemProperties.get('is_private', None) # Adds the is_private flag to qbitItem info for simplified logging
|
||||
if qbitItemProperties.get('is_private', False):
|
||||
privateDowloadIDs.append(str.upper(qbitItem['hash']))
|
||||
logger.debug('main/getProtectedAndPrivateFromQbit/qbitItems: %s', str([{"hash": str.upper(item["hash"]), "name": item["name"], "tags": item["tags"], "is_private": item.get("is_private", None)} for item in qbitItems]))
|
||||
logger.debug('main/getProtectedAndPrivateFromQbit/qbitItems: %s', str([{"hash": str.upper(item["hash"]), "name": item["name"], "category": item["category"], "tags": item["tags"], "is_private": item.get("is_private", None)} for item in qbitItems]))
|
||||
|
||||
logger.debug('main/getProtectedAndPrivateFromQbit/protectedDownloadIDs: %s', str(protectedDownloadIDs))
|
||||
logger.debug('main/getProtectedAndPrivateFromQbit/privateDowloadIDs: %s', str(privateDowloadIDs))
|
||||
|
||||
@@ -51,9 +51,9 @@ async def queueCleaner(settingsDict, arr_type, defective_tracker, download_sizes
|
||||
if not full_queue:
|
||||
logger.verbose('>>> Queue is empty.')
|
||||
return
|
||||
else:
|
||||
logger.debug('queueCleaner/full_queue at start:')
|
||||
logger.debug(full_queue)
|
||||
# else:
|
||||
# logger.debug('queueCleaner/full_queue at start:')
|
||||
# logger.debug(full_queue)
|
||||
|
||||
deleted_downloads = Deleted_Downloads([])
|
||||
items_detected = 0
|
||||
|
||||
@@ -9,9 +9,9 @@ async def remove_orphans(settingsDict, BASE_URL, API_KEY, NAME, deleted_download
|
||||
failType = 'orphan'
|
||||
full_queue = await get_queue(BASE_URL, API_KEY, params = {full_queue_param: True})
|
||||
queue = await get_queue(BASE_URL, API_KEY)
|
||||
logger.debug('remove_orphans/full queue IN: %s', str(full_queue))
|
||||
logger.debug('remove_orphans/full queue IN: %s', formattedQueueInfo(full_queue))
|
||||
if not full_queue: return 0 # By now the queue may be empty
|
||||
logger.debug('remove_orphans/queue IN: %s', str(queue))
|
||||
logger.debug('remove_orphans/queue IN: %s', formattedQueueInfo(queue))
|
||||
|
||||
# Find items affected
|
||||
# 1. create a list of the "known" queue items
|
||||
@@ -27,7 +27,7 @@ async def remove_orphans(settingsDict, BASE_URL, API_KEY, NAME, deleted_download
|
||||
doPrivateTrackerCheck = True,
|
||||
doProtectedDownloadCheck = True,
|
||||
doPermittedAttemptsCheck = False)
|
||||
logger.debug('remove_orphans/full queue OUT: %s', str(await get_queue(BASE_URL, API_KEY, params = {full_queue_param: True})))
|
||||
logger.debug('remove_orphans/full queue OUT: %s', formattedQueueInfo(await get_queue(BASE_URL, API_KEY, params = {full_queue_param: True})))
|
||||
return len(affectedItems)
|
||||
except Exception as error:
|
||||
errorDetails(NAME, error)
|
||||
|
||||
Reference in New Issue
Block a user