Update Extras.bash

This commit is contained in:
RandomNinjaAtk 2023-07-09 11:56:51 -04:00 committed by GitHub
parent 37d315eb18
commit 94837219f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -63,21 +63,14 @@ if [ "$enableExtras" != "true" ]; then
exit exit
fi fi
if [ "$autoScan" == "true" ]; then # Check for cookies file
if [ ! -z "$2" ]; then if [ -f /config/cookies.txt ]; then
cookiesFile="$2" cookiesFile="/config/cookies.txt"
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!" log "Cookies File Found!"
else else
log "Cookies File Not Found!" log "Cookies File Not Found!"
cookiesFile="" cookiesFile=""
fi fi
fi
arrItemData=$(curl -s "$arrUrl/api/v3/movie/$arrItemId?apikey=$arrApiKey") arrItemData=$(curl -s "$arrUrl/api/v3/movie/$arrItemId?apikey=$arrApiKey")
itemTitle=$(echo "$arrItemData" | jq -r .title) itemTitle=$(echo "$arrItemData" | jq -r .title)