v2.44 - Bug fix for download client not being added..

#249 - Resolves this...
This commit is contained in:
RandomNinjaAtk 2024-04-29 19:48:51 -04:00 committed by GitHub
parent f39d1c0540
commit 7c4ee17274
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,5 +1,5 @@
#!/usr/bin/with-contenv bash #!/usr/bin/with-contenv bash
scriptVersion="2.43" scriptVersion="2.44"
scriptName="Audio" scriptName="Audio"
### Import Settings ### Import Settings
@ -13,13 +13,15 @@ AddTag () {
} }
AddDownloadClient () { 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 if [ -z "$downloadClientCheck" ]; then
AddTag AddTag
if [ ! -d "$importPath" ]; then if [ ! -d "$importPath" ]; then
mkdir -p "$importPath" mkdir -p "$importPath"
chmod 777 -R "$importPath" chmod 777 -R "$importPath"
fi 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\":[]}") 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 fi
} }
@ -65,6 +67,7 @@ verifyConfig () {
audioPath="$downloadPath/audio" audioPath="$downloadPath/audio"
} }
Configuration () { Configuration () {
@ -101,6 +104,7 @@ Configuration () {
fi fi
verifyApiAccess verifyApiAccess
AddDownloadClient
if [ "$addDeezerTopArtists" == "true" ]; then if [ "$addDeezerTopArtists" == "true" ]; then
log "Add Deezer Top $topLimit Artists is enabled" log "Add Deezer Top $topLimit Artists is enabled"