diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index d95c604..97197e6 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -44,7 +44,7 @@ jobs: - name: "Build, Tag, and push the Docker image" env: - IMAGE_NAME: ghcr.io/fxsch/decluttarr + IMAGE_NAME: ghcr.io/manimatter/decluttarr IMAGE_TAG: dev run: | docker build -f docker/Dockerfile -t $IMAGE_NAME:$IMAGE_TAG . diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 360af2c..ff0d17d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -9,26 +9,6 @@ on: workflow_dispatch: jobs: - # unit-tests: - # runs-on: ubuntu-latest - # defaults: - # run: - # working-directory: '.' - # steps: - # - uses: actions/checkout@v4 - - # - name: Set up Python - # uses: actions/setup-python@v4 - # with: - # python-version: '3.x' - # - name: Install pip and pytest - # run: | - # python -m pip install --upgrade pip - # pip install -r docker/requirements.txt - # - name: Test with pytest - # run: | - # python3 -m pytest --import-mode=append tests/ - build-main: runs-on: ubuntu-latest defaults: @@ -64,40 +44,15 @@ jobs: - name: "Build, Tag, and push the Docker image" env: - IMAGE_NAME: ghcr.io/fxsch/decluttarr + IMAGE_NAME: ghcr.io/manimatter/decluttarr IMAGE_TAG: ${{ steps.setversion.outputs.new_tag }} run: | docker buildx build --platform linux/amd64,linux/arm64 -t $IMAGE_NAME:$IMAGE_TAG -f docker/Dockerfile --push . - name: "Build, Tag, and push the Docker image" env: - IMAGE_NAME: ghcr.io/fxsch/decluttarr + IMAGE_NAME: ghcr.io/manimatter/decluttarr IMAGE_TAG: latest run: | docker buildx build --platform linux/amd64,linux/arm64 -t $IMAGE_NAME:$IMAGE_TAG -f docker/Dockerfile --push . - # build-dev: - # if: github.ref == 'refs/heads/dev' - # needs: unit-tests - # runs-on: ubuntu-latest - # defaults: - # run: - # working-directory: '.' - # steps: - # - name: 'Checkout GitHub Action' - # uses: actions/checkout@main - - # - name: 'Login to GitHub Container Registry' - # uses: docker/login-action@v1 - # with: - # registry: ghcr.io - # username: ${{github.actor}} - # password: ${{secrets.GITHUB_TOKEN}} - - # - name: "Build, Tag, and push the Docker image" - # env: - # IMAGE_NAME: ghcr.io/manimatter/decluttarr - # IMAGE_TAG: dev - # run: | - # docker build -f docker/Dockerfile -t $IMAGE_NAME:$IMAGE_TAG . - # docker push $IMAGE_NAME:$IMAGE_TAG diff --git a/README.md b/README.md index 2f15a7c..ca5044e 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Feature overview: - Automatically delete failed downloads (& trigger download from another source) - Automatically delete downloads belonging to Movies/TV shows/Music requests that have been deleted in the meantime ('Orphan downloads') - Automatically delete stalled downloads, after they have been found to be stalled multiple times in a row -- Automatically delete downloads belonging to Movies/TV shows/Music that are unmonitored +- Automatically delete downloads belonging to Movies/TV shows/Music requests that are unmonitored You may run this locally by launching main.py, or by pulling the docker image. You can find a sample docker-compose.yml in the docker folder. @@ -27,12 +27,11 @@ Both ways are explained below and there's an explanation for the different setti version: "3.3" services: decluttarr: - image: "ghcr.io/fxsch/decluttarr:latest" + image: ghcr.io/manimatter/decluttarr:latest container_name: decluttarr - restart: unless-stopped - network_mode: "host" + restart: always environment: - - TZ=Europe/Berlin + - TZ=Europe/Zurich - PUID=1000 - PGID=1000 # General @@ -206,11 +205,12 @@ Use Sonarr v4 & Radarr v5 (currently 'nightly' tag instead of 'latest'), else ce Use latest version of qBittorrent. ## Credits -- ManiMatter for making this, I just forked it to fix some stuff - Script for detecting stalled downloads expanded on code by MattDGTL/sonarr-radarr-queue-cleaner - Script to read out config expanded on code by syncarr/syncarr - SONARR/RADARR team & contributors for their great product, API documenation, and guidance in their Discord channel - Particular thanks to them for adding an additional flag to their API that allowed this script detect downloads stuck finding metadata +- craggles17 for arm compatibility +- Fxsch for improved documentation / ReadMe ## Disclaimer This script comes free of any warranty, and you are using it at your own risk. diff --git a/config/config.conf-Example b/config/config.conf-Example new file mode 100644 index 0000000..ecd0f17 --- /dev/null +++ b/config/config.conf-Example @@ -0,0 +1,30 @@ +[general] +LOG_LEVEL = VERBOSE +TEST_RUN = True + +[features] +REMOVE_TIMER = 10 +REMOVE_FAILED = True +REMOVE_STALLED = True +REMOVE_METADATA_MISSING = True +REMOVE_ORPHANS = True +REMOVE_UNMONITORED = True +PERMITTED_ATTEMPTS = 3 +NO_STALLED_REMOVAL_QBIT_TAG = Don't Kill If Stalled + +[radarr] +RADARR_URL = http://radarr:7878 +RADARR_KEY = $RADARR_KEY + +[sonarr] +SONARR_URL = http://sonarr:8989 +SONARR_KEY = $SONARR_KEY + +[lidarr] +LIDARR_URL = http://lidarr:8686 +LIDARR_KEY = $LIDARR_KEY + +[qbittorrent] +QBITTORRENT_URL = http://qbittorrent:8080 +QBITTORRENT_USERNAME = Your name (or empty) +QBITTORRENT_PASSWORD = Your password (or empty) \ No newline at end of file diff --git a/docker/Dockerfile b/docker/Dockerfile index aeeab1b..e584110 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,6 +1,6 @@ #FROM python:3.9-slim-buster FROM python:3.10.13-slim -LABEL org.opencontainers.image.source="https://github.com/Fxsch/decluttarr" +LABEL org.opencontainers.image.source="https://github.com/ManiMatter/decluttarr" ENV IS_IN_DOCKER 1