From 1c2bd147b08a722c7c7d658c00cacb23e8ddab96 Mon Sep 17 00:00:00 2001 From: RandomNinjaAtk Date: Fri, 2 Sep 2022 16:58:58 -0400 Subject: [PATCH] bugfix --- root/scripts/AutoConfig.bash | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/root/scripts/AutoConfig.bash b/root/scripts/AutoConfig.bash index bdd66fe..ee67435 100644 --- a/root/scripts/AutoConfig.bash +++ b/root/scripts/AutoConfig.bash @@ -3,8 +3,8 @@ scriptVersion="1.0.001" if [ -z "$arrUrl" ] || [ -z "$arrApiKey" ]; then arrUrlBase="$(cat /config/config.xml | xq | jq -r .Config.UrlBase)" - if [ "$arrUrlBase" = "null" ]; then - arrlBase="" + if [ "$arrUrlBase" == "null" ]; then + arrUrlBase="" else arrUrlBase="/$(echo "$arrUrlBase" | sed "s/\///g")" fi @@ -30,7 +30,7 @@ log "Getting Trash Guide Recommended Movie Naming..." movieNaming="$(curl -s https://raw.githubusercontent.com/TRaSH-/Guides/master/docs/Radarr/Radarr-recommended-naming-scheme.md | grep "{Movie Clean" | head -n 1)" log "Updating Radarr Moving Naming..." -curl "$arrUrl/api/v3/config/naming" -X PUT -H "Content-Type: application/json" -H "X-Api-Key: $arrApiKey" --data-raw "{ +updateArr=$(curl -s "$arrUrl/api/v3/config/naming" -X PUT -H "Content-Type: application/json" -H "X-Api-Key: $arrApiKey" --data-raw "{ \"renameMovies\":true, \"replaceIllegalCharacters\":true, \"colonReplacementFormat\":\"delete\", @@ -39,7 +39,7 @@ curl "$arrUrl/api/v3/config/naming" -X PUT -H "Content-Type: application/json" - \"includeQuality\":false, \"replaceSpaces\":false, \"id\":1 - }" + }") log "Complete" exit