2.42 - Only add client and tag if not already added...
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
scriptVersion="2.41"
|
||||
scriptVersion="2.42"
|
||||
scriptName="Audio"
|
||||
|
||||
### Import Settings
|
||||
@@ -13,12 +13,15 @@ AddTag () {
|
||||
}
|
||||
|
||||
AddDownloadClient () {
|
||||
AddTag
|
||||
if [ ! -d "$importPath" ]; then
|
||||
mkdir -p "$importPath"
|
||||
chmod 777 -R "$importPath"
|
||||
fi
|
||||
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\":[]}")
|
||||
downloadClientCheck=$(curl -s "$arrUrl/api/v1/downloadclient" --header "X-Api-Key:"${arrApiKey} -H "Content-Type: application/json")
|
||||
if [ -z "$downloadClientCheck" ]; then
|
||||
AddTag
|
||||
if [ ! -d "$importPath" ]; then
|
||||
mkdir -p "$importPath"
|
||||
chmod 777 -R "$importPath"
|
||||
fi
|
||||
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
|
||||
}
|
||||
|
||||
verifyConfig () {
|
||||
|
||||
Reference in New Issue
Block a user