From 94837219f21a2b576928276da3f10bc2c8b08bb2 Mon Sep 17 00:00:00 2001 From: RandomNinjaAtk Date: Sun, 9 Jul 2023 11:56:51 -0400 Subject: [PATCH] Update Extras.bash --- radarr/Extras.bash | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/radarr/Extras.bash b/radarr/Extras.bash index 1a85369..6170e43 100644 --- a/radarr/Extras.bash +++ b/radarr/Extras.bash @@ -63,21 +63,14 @@ if [ "$enableExtras" != "true" ]; then exit fi -if [ "$autoScan" == "true" ]; then - if [ ! -z "$2" ]; then - cookiesFile="$2" - else - cookiesFile="" - fi -else - if find /config -type f -iname "cookies.txt" | read; then - cookiesFile="$(find /config -type f -iname "cookies.txt" | head -n1)" - log "Cookies File Found!" - else - log "Cookies File Not Found!" - cookiesFile="" - fi -fi +# Check for cookies file +if [ -f /config/cookies.txt ]; then + cookiesFile="/config/cookies.txt" + log "Cookies File Found!" + else + log "Cookies File Not Found!" + cookiesFile="" + fi arrItemData=$(curl -s "$arrUrl/api/v3/movie/$arrItemId?apikey=$arrApiKey") itemTitle=$(echo "$arrItemData" | jq -r .title)