1.0.050 - Improve cookes.txt process and better error message

pull/139/head
RandomNinjaAtk 2 years ago committed by GitHub
parent 4a0be66903
commit 6ccf223a05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,5 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
scriptVersion="1.0.049" scriptVersion="1.0.050"
if [ -z "$lidarrUrl" ] || [ -z "$lidarrApiKey" ]; then if [ -z "$lidarrUrl" ] || [ -z "$lidarrApiKey" ]; then
lidarrUrlBase="$(cat /config/config.xml | xq | jq -r .Config.UrlBase)" lidarrUrlBase="$(cat /config/config.xml | xq | jq -r .Config.UrlBase)"
@ -80,13 +80,14 @@ Configuration () {
log "CONFIG :: Music Video Location :: $videoPath" log "CONFIG :: Music Video Location :: $videoPath"
log "CONFIG :: Subtitle Language set to: $youtubeSubtitleLanguage" log "CONFIG :: Subtitle Language set to: $youtubeSubtitleLanguage"
log "CONFIG :: yt-dlp format: $videoFormat" log "CONFIG :: yt-dlp format: $videoFormat"
if find /config -type f -iname "cookies.txt" | read; then if [ -f "/config/cookies.txt" ]; then
cookiesFile="$(find /config -type f -iname "cookies.txt" | head -n1)" cookiesFile="/config/cookies.txt"
log "CONFIG :: Cookies File Found!" log "CONFIG :: Cookies File Found! (/config/cookies.txt)"
else else
log "CONFIG :: Cookies File Not Found!" log "CONFIG :: ERROR :: Cookies File Not Found!"
cookiesFile="" log "CONFIG :: ERROR :: Add yt-dlp compatible cookies.txt to the following location: /config/cookies.txt"
fi cookiesFile=""
fi
log "CONFIG :: Complete" log "CONFIG :: Complete"
} }

Loading…
Cancel
Save