From 071c9c220853b16edf8fb6783332fbff5e168373 Mon Sep 17 00:00:00 2001 From: RandomNinjaAtk Date: Thu, 16 Jun 2022 21:41:42 -0400 Subject: [PATCH] 1.0.0014 - Check Lidarr for root folder, if none found, exit script... --- root/scripts/download.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/root/scripts/download.sh b/root/scripts/download.sh index 9441ee4..ce10126 100644 --- a/root/scripts/download.sh +++ b/root/scripts/download.sh @@ -35,7 +35,7 @@ Configuration () { log "" sleep 2 log "############# $dockerTitle" - log "############# SCRIPT VERSION 1.0.0013" + log "############# SCRIPT VERSION 1.0.0014" log "############# DOCKER VERSION $dockerVersion" if [ -z $topLimit ]; then @@ -412,6 +412,13 @@ ConfigureLidarrWithOptimalSettings () { log ":: Configuring Lidarr UI Settings" postSettingsToLidarr=$(curl -s "$lidarrUrl/api/v1/config/u" -X PUT -H 'Content-Type: application/json' -H "X-Api-Key: ${lidarrApiKey}" --data-raw '{"firstDayOfWeek":0,"calendarWeekColumnHeader":"ddd M/D","shortDateFormat":"MMM D YYYY","longDateFormat":"dddd, MMMM D YYYY","timeFormat":"h(:mm)a","showRelativeDates":true,"enableColorImpairedMode":true,"uiLanguage":1,"expandAlbumByDefault":true,"expandSingleByDefault":true,"expandEPByDefault":true,"expandBroadcastByDefault":true,"expandOtherByDefault":true,"id":1}') + + if curl -s "$lidarrUrl/api/v1/rootFolder" -H "X-Api-Key: ${lidarrApiKey}" | grep "[]" | read; then + log ":: ERROR :: No root folder found" + log ":: ERROR :: Configure root folder in Lidarr to continue..." + log ":: ERROR :: Exiting..." + exit + fi } GetMissingCutOffList () {