From 2672910120c15ae01810f547a2ee24bf4d58a8bf Mon Sep 17 00:00:00 2001 From: youegraillot Date: Sun, 10 Sep 2023 19:15:08 +0200 Subject: [PATCH] new CLEAN_DOWNLOADS option --- Dockerfile | 1 + README.md | 3 ++- root/usr/local/bin/clean-downloads.sh | 4 ++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 328660b..7953644 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,6 +28,7 @@ LABEL maintainer="youegraillot" ENV DEEMIX_SINGLE_USER=true ENV AUTOCONFIG=true +ENV CLEAN_DOWNLOADS=true ENV PUID=1000 ENV PGID=1000 diff --git a/README.md b/README.md index b835125..aaaeec2 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,8 @@ This allows an easy deployment, with the advantage of having a direct control ov | `-e PUID=1000` | for UserID | | `-e PGID=1000` | for GroupID | | `-e AUTOCONFIG=true` | Enable automatic configuration - see below for explanation | -| `-e FLAC2CUSTOM_ARGS=true` | Sets arguments used when calling flac2custom.sh | +| `-e FLAC2CUSTOM_ARGS=""` | Sets arguments used when calling flac2custom.sh | +| `-e CLEAN_DOWNLOADS=true` | Enable cleaning empty folders in /downloads | | `-v /config` | Configuration files for Lidarr. | | `-v /config_deemix` | Configuration files for Deemix. | | `-v /downloads` | Path to your download folder for music. | diff --git a/root/usr/local/bin/clean-downloads.sh b/root/usr/local/bin/clean-downloads.sh index d058e2d..5cb64b6 100755 --- a/root/usr/local/bin/clean-downloads.sh +++ b/root/usr/local/bin/clean-downloads.sh @@ -1,5 +1,9 @@ #!/bin/bash +if [ "$CLEAN_DOWNLOADS" != "true" ]; then + exit +fi + echo "Info|Lidarr event: $lidarr_eventtype" >&2 # Handle Lidarr Test event