From 3d4b310d51adcda2a87453a3b0313722760b9844 Mon Sep 17 00:00:00 2001 From: RandomNinjaAtk Date: Mon, 11 Jul 2022 17:08:55 +0000 Subject: [PATCH] 1.0.142 - Only consolidate when needed --- root/scripts/download.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/root/scripts/download.sh b/root/scripts/download.sh index 9425033..eed90d7 100644 --- a/root/scripts/download.sh +++ b/root/scripts/download.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -scriptVersion="1.0.141" +scriptVersion="1.0.142" lidarrUrlBase="$(cat /config/config.xml | xq | jq -r .Config.UrlBase)" if [ "$lidarrUrlBase" = "null" ]; then lidarrUrlBase="" @@ -605,10 +605,12 @@ DownloadProcess () { fi # Consolidate files to a single folder - log ":: $processNumber of $wantedListAlbumTotal :: $lidarrArtistNameSanitized :: $lidarrAlbumTitle :: Consolidating files to single folder" - find "/downloads/lidarr-extended/incomplete" -type f -exec mv "{}" /downloads/lidarr-extended/incomplete/ \; - find /downloads/lidarr-extended/incomplete -mindepth 1 -type d -empty -exec rm -rf "{}" \; &>/dev/null - find /downloads/lidarr-extended/incomplete -mindepth 1 -type d -empty -exec rm -rf "{}" \; &>/dev/null + if [ "$2" = "TIDAL" ]; then + log ":: $processNumber of $wantedListAlbumTotal :: $lidarrArtistNameSanitized :: $lidarrAlbumTitle :: Consolidating files to single folder" + find "/downloads/lidarr-extended/incomplete" -type f -exec mv "{}" /downloads/lidarr-extended/incomplete/ \; + find /downloads/lidarr-extended/incomplete -mindepth 1 -type d -empty -exec rm -rf "{}" \; &>/dev/null + find /downloads/lidarr-extended/incomplete -mindepth 1 -type d -empty -exec rm -rf "{}" \; &>/dev/null + fi # Check download for required quality (checks based on file extension) DownloadQualityCheck "/downloads/lidarr-extended/incomplete" "$2"