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