From 338fe8d56f645de60e4f3a1de8dc27b7367aad35 Mon Sep 17 00:00:00 2001 From: RandomNinjaAtk Date: Thu, 16 Jun 2022 12:44:36 +0000 Subject: [PATCH] v1.0.0008 - Auto configure Lidarr custom scripts --- root/scripts/download.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/root/scripts/download.sh b/root/scripts/download.sh index cb97b80..d36137f 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.0007" + log "############# SCRIPT VERSION 1.0.0008" log "############# DOCKER VERSION $dockerVersion" if [ -z $topLimit ]; then @@ -400,6 +400,10 @@ ConfigureLidarrWithOptimalSettings () { log ":: Configuring Lidarr Metadata Provider Settings" postSettingsToLidarr=$(curl -s "$lidarrUrl/api/v1/config/metadataProvider" -X PUT -H 'Content-Type: application/json' -H "X-Api-Key: ${lidarrApiKey}" --data-raw '{"metadataSource":"","writeAudioTags":"sync","scrubAudioTags":true,"id":1}') + log ":: Configuring Lidarr Custom Scripts" + postSettingsToLidarr=$(curl -s "$lidarrUrl/api/v1/filesystem?path=%2Fconfig%2Fextended%2Fscripts%2FPlexNotify.bash&allowFoldersWithoutTrailingSlashes=true&includeFiles=true" -H "X-Api-Key: ${lidarrApiKey}") + + postSettingsToLidarr=$(curl -s "$lidarrUrl/api/v1/notification?" -X POST -H 'Content-Type: application/json' -H "X-Api-Key: ${lidarrApiKey}" --data-raw '{"onGrab":false,"onReleaseImport":true,"onUpgrade":true,"onRename":true,"onHealthIssue":false,"onDownloadFailure":false,"onImportFailure":false,"onTrackRetag":true,"onApplicationUpdate":false,"supportsOnGrab":true,"supportsOnReleaseImport":true,"supportsOnUpgrade":true,"supportsOnRename":true,"supportsOnHealthIssue":true,"includeHealthWarnings":false,"supportsOnDownloadFailure":false,"supportsOnImportFailure":false,"supportsOnTrackRetag":true,"supportsOnApplicationUpdate":true,"name":"PlexNotify.bash","fields":[{"name":"path","value":"/config/extended/scripts/PlexNotify.bash"},{"name":"arguments"}],"implementationName":"Custom Script","implementation":"CustomScript","configContract":"CustomScriptSettings","infoLink":"https://wiki.servarr.com/lidarr/supported#customscript","message":{"message":"Testing will execute the script with the EventType set to Test, ensure your script handles this correctly","type":"warning"},"tags":[]}') } GetMissingCutOffList () {