From 7c4ee17274769f558afc78e5871be2b1252bdf6a Mon Sep 17 00:00:00 2001 From: RandomNinjaAtk Date: Mon, 29 Apr 2024 19:48:51 -0400 Subject: [PATCH] v2.44 - Bug fix for download client not being added.. #249 - Resolves this... --- lidarr/Audio.service.bash | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lidarr/Audio.service.bash b/lidarr/Audio.service.bash index 5c6e49a..17d48c5 100644 --- a/lidarr/Audio.service.bash +++ b/lidarr/Audio.service.bash @@ -1,5 +1,5 @@ #!/usr/bin/with-contenv bash -scriptVersion="2.43" +scriptVersion="2.44" scriptName="Audio" ### Import Settings @@ -13,13 +13,15 @@ AddTag () { } AddDownloadClient () { - downloadClientCheck=$(curl -s "$arrUrl/api/v1/downloadclient" --header "X-Api-Key:"${arrApiKey} -H "Content-Type: application/json") + downloadClientsData=$(curl -s "$arrUrl/api/v1/downloadclient" --header "X-Api-Key:"${arrApiKey} -H "Content-Type: application/json") + downloadClientCheck="$(echo $downloadClientsData | grep "Arr-Extended")" if [ -z "$downloadClientCheck" ]; then AddTag if [ ! -d "$importPath" ]; then mkdir -p "$importPath" chmod 777 -R "$importPath" fi + log "Adding download Client" lidarrProcessIt=$(curl -s "$arrUrl/api/v1/downloadclient" --header "X-Api-Key:"${arrApiKey} -H "Content-Type: application/json" --data-raw "{\"enable\":true,\"protocol\":\"usenet\",\"priority\":10,\"removeCompletedDownloads\":true,\"removeFailedDownloads\":true,\"name\":\"Arr-Extended\",\"fields\":[{\"name\":\"nzbFolder\",\"value\":\"/config/extended/downloads/\"},{\"name\":\"watchFolder\",\"value\":\"$importPath\"}],\"implementationName\":\"Usenet Blackhole\",\"implementation\":\"UsenetBlackhole\",\"configContract\":\"UsenetBlackholeSettings\",\"infoLink\":\"https://wiki.servarr.com/lidarr/supported#usenetblackhole\",\"tags\":[]}") fi } @@ -65,6 +67,7 @@ verifyConfig () { audioPath="$downloadPath/audio" + } Configuration () { @@ -101,6 +104,7 @@ Configuration () { fi verifyApiAccess + AddDownloadClient if [ "$addDeezerTopArtists" == "true" ]; then log "Add Deezer Top $topLimit Artists is enabled" @@ -1859,7 +1863,7 @@ log "Starting Script...." for (( ; ; )); do let i++ logfileSetup - verifyConfig + verifyConfig getArrAppInfo verifyApiAccess AudioProcess