v1.0.014 - Skip search for cookies.txt, when called by auto script

pull/49/head
RandomNinjaAtk 2 years ago committed by GitHub
parent 1e0604eab7
commit c2019660b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,5 +1,5 @@
#!/usr/bin/env bash
scriptVersion="1.0.013"
scriptVersion="1.0.014"
arrEventType="$radarr_eventtype"
arrItemId=$radarr_movie_id
tmdbApiKey="3b7751e3179f796565d88fdb2fcdf426"
@ -9,6 +9,8 @@ updatePlex="false"
if [ ! -z "$1" ]; then
arrItemId="$1"
autoScan="true"
else
autoScan="false"
fi
# Debugging
@ -56,12 +58,20 @@ if [ "$enableExtras" != "true" ]; then
exit
fi
if find /config -type f -name "cookies.txt" | read; then
cookiesFile="$(find /config -type f -iname "cookies.txt" | head -n1)"
log "Cookies File Found!"
if [ "$autoScan" == "true" ]; then
if [ ! -z "$2" ]; then
cookiesFile="$2"
else
cookiesFile=""
fi
else
log "Cookies File Not Found!"
cookiesFile=""
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
arrItemData=$(curl -s "$arrUrl/api/v3/movie/$arrItemId?apikey=$arrApiKey")

Loading…
Cancel
Save