From 5dbf8ef76f30ca2b7a4dc2c84d60317683cd2965 Mon Sep 17 00:00:00 2001 From: RandomNinjaAtk Date: Fri, 8 Jul 2022 19:00:48 +0000 Subject: [PATCH] v1.0.106 - small logging enhancements to search process --- root/scripts/download.sh | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/root/scripts/download.sh b/root/scripts/download.sh index 0b38ab1..af2c3b9 100644 --- a/root/scripts/download.sh +++ b/root/scripts/download.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -scriptVersion="1.0.105" +scriptVersion="1.0.106" lidarrUrlBase="$(cat /config/config.xml | xq | jq -r .Config.UrlBase)" if [ "$lidarrUrlBase" = "null" ]; then lidarrUrlBase="" @@ -1243,8 +1243,19 @@ SearchProcess () { fi done - mkdir -p /config/extended/logs/downloaded/notfound - touch /config/extended/logs/downloaded/notfound/$lidarrAlbumForeignAlbumId + log ":: $processNumber of $wantedListAlbumTotal :: $lidarrArtistNameSanitized :: $lidarrAlbumTitle :: Album Not found" + if [ ! -d /config/extended/logs/downloaded/notfound ]; then + mkdir -p /config/extended/logs/downloaded/notfound + chmod 777 /config/extended/logs/downloaded/notfound + chown abc:abc /config/extended/logs/downloaded/notfound + fi + log ":: $processNumber of $wantedListAlbumTotal :: $lidarrArtistNameSanitized :: $lidarrAlbumTitle :: Marking Album as notfound" + if [ ! -f touch /config/extended/logs/downloaded/notfound/$lidarrAlbumForeignAlbumId ]; then + touch /config/extended/logs/downloaded/notfound/$lidarrAlbumForeignAlbumId + chmod 666 /config/extended/logs/downloaded/notfound/$lidarrAlbumForeignAlbumId + chown abc:abc /config/extended/logs/downloaded/notfound/$lidarrAlbumForeignAlbumId + fi + log ":: $processNumber of $wantedListAlbumTotal :: $lidarrArtistNameSanitized :: $lidarrAlbumTitle :: Search Complete..." done }