From 1d39d74b5946341a0f228154d5be0f26e1fbcf2a Mon Sep 17 00:00:00 2001 From: RandomNinjaAtk Date: Thu, 14 Jul 2022 14:56:14 -0400 Subject: [PATCH] v1.0.177 - minor bug fixes... --- root/scripts/download.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/root/scripts/download.sh b/root/scripts/download.sh index 1765129..765c283 100644 --- a/root/scripts/download.sh +++ b/root/scripts/download.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -scriptVersion="1.0.176" +scriptVersion="1.0.177" lidarrUrlBase="$(cat /config/config.xml | xq | jq -r .Config.UrlBase)" if [ "$lidarrUrlBase" = "null" ]; then lidarrUrlBase="" @@ -529,7 +529,9 @@ DownloadProcess () { if [ "$completedVerification" = "true" ]; then break elif [ $downloadTry = 5 ]; then - rm /downloads/lidarr-extended/incomplete/* + if [ -d /downloads/lidarr-extended/incomplete ]; then + rm -rf /downloads/lidarr-extended/incomplete/* + fi break else log ":: $processNumber of $wantedListAlbumTotal :: $lidarrArtistNameSanitized :: $lidarrAlbumTitle :: $lidarrAlbumType :: Retry Download to fix errors..." @@ -567,7 +569,9 @@ DownloadProcess () { if [ "$completedVerification" = "true" ]; then break elif [ $downloadTry = 5 ]; then - rm /downloads/lidarr-extended/incomplete/* + if [ -d /downloads/lidarr-extended/incomplete ]; then + rm -rf /downloads/lidarr-extended/incomplete/* + fi break else log ":: $processNumber of $wantedListAlbumTotal :: $lidarrArtistNameSanitized :: $lidarrAlbumTitle :: $lidarrAlbumType :: Retry Download in 5 seconds to fix errors..."