ManiMatter / decluttarr

Watches radarr, sonarr, lidarr, readarr and whisparr download queues and removes downloads if they become stalled or no longer needed.
GNU General Public License v3.0
99 stars 15 forks source link

Only deletes slow downloads #92

Closed Medroid closed 2 months ago

Medroid commented 2 months ago

During the initial testing of the script, I was running it in a Docker container against the qBittorrent default ASUSTOR App with great success. As this was a temporary setup, I decided to move the qBittorrent client to a Docker container as well. That’s when the problem started.

I have created a scenario where there are 3 files with different conditions for deletion. As you can see by the picture below, there is one stalled download, one downloading metadata, and one slow. According to the log, the slow download is deleted successfully, but not the others. The logs keep saying “Queue is clean”. Am I missing something obvious? Is this related to issue #56?

before: image

after:

image

DEBUG log:

_Decluttarr_logs_DEBUG.txt

The setup is as follow:

qBittorrent container -> V4.6.4 pulled from lscr.io/linuxserver/qbittorrent:latest gluetu container -> pulled from qmcgaw/gluetun (Used as a VPN tunnel for the qBittorrent container) raddar container -> V5.3.6.8612 from lscr.io/linuxserver/radarr:latest sonarr container -> V4.0.3.1413 from lscr.io/linuxserver/sonarr :latest decluttarr container -> docker compose as follows:

 version: "3.3"
 services:
   decluttarr:
     image: ghcr.io/manimatter/decluttarr:latest
     container_name: Decluttarr
     restart: always
     environment:
       - TZ=America/Sao_Paulo
       - PUID=1000
       - PGID=1000
       ## General
       - LOG_LEVEL=DEBUG
       #- TEST_RUN=True
       #- SSL_VERIFICATION=False
       ## Features 
       - REMOVE_TIMER=5
       - REMOVE_FAILED=True
       - REMOVE_METADATA_MISSING=True
       - REMOVE_MISSING_FILES=True     
       - REMOVE_ORPHANS=True
       - REMOVE_SLOW=True
       - REMOVE_STALLED=True
       - REMOVE_UNMONITORED=False
       - MIN_DOWNLOAD_SPEED=20
       - PERMITTED_ATTEMPTS=3
       - NO_STALLED_REMOVAL_QBIT_TAG=Don't Kill
       - IGNORE_PRIVATE_TRACKERS=False
       ## Radarr
       - RADARR_URL=http://192.168.68.113:17878
       - RADARR_KEY=REDACTED
       ## Sonarr
       - SONARR_URL=http://192.168.68.113:18989
       - SONARR_KEY=REDACTED
       ## Lidarr
       - LIDARR_URL=
       - LIDARR_KEY=$LIDARR_API_KEY
       ## Readarr
       - READARR_URL=
       - READARR_KEY=$READARR_API_KEY
       ## qBittorrent
       - QBITTORRENT_URL=http://192.168.68.113:8080
       - QBITTORRENT_USERNAME=REDACTED
       - QBITTORRENT_PASSWORD=REDACTED
ManiMatter commented 2 months ago

hi @Medroid

quite simple: language.

'qBittorrent está baixando metadados',
'O download está parado sem conexões'

the checks are in english: if queueItem['status'] == 'queued' and queueItem['errorMessage'] == 'qBittorrent is downloading metadata': if queueItem['status'] == 'warning' and queueItem['errorMessage'] == 'The download is stalled with no connections':

I would not know how to switch this to support any language I'm afraid. If you can live with radarr/sonarr in english, I think if you switch that should do the trick

(obviously, if you find a clever way to create a PR to support other languages, happy to review it)

Medroid commented 2 months ago

Hi @ManiMatter, indeed that was the problem.

I don’t even know why I switched it to Portuguese in the first place. Convenience maybe? Either way changing the language solved all issues.

I believe this could be added to the “Dependencies & Hints & FAQ” section. Perhaps something like:

Currently, “*Arr” apps are only supported in English. Refer to issue #92 for more details.

PS: I would love to contribute to supporting other languages, but unfortunately, I lack the necessary time and skills to do so.

Thanks.

ManiMatter commented 2 months ago

Thanks, happy to add that. Cheers