1.0.002 - Log when no cleanup is needed

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

@ -1,5 +1,5 @@
#!/usr/bin/env bash
scriptVersion="1.0.001"
scriptVersion="1.0.002"
if [ -z "$arrUrl" ] || [ -z "$arrApiKey" ]; then
arrUrlBase="$(cat /config/config.xml | xq | jq -r .Config.UrlBase)"
@ -29,6 +29,11 @@ log () {
# Get invalid series tvdb id's
seriesTvdbId="$(curl -s --header "X-Api-Key:"$arrApiKey --request GET "$arrUrl/api/v3/health" | jq -r '.[] | select(.source=="RemovedSeriesCheck") | select(.type=="error")' | grep "message" | grep -o '[[:digit:]]*')"
if [ -z "$seriesTvdbId" ]; then
log "No invalid tvdbid's reported by Sonarr health check, skipping..."
exit
fi
# Process each invalid series tvdb id
for tvdbId in $(echo $seriesTvdbId); do
seriesData="$(curl -s --header "X-Api-Key:"$arrApiKey --request GET "$arrUrl/api/v3/series" | jq -r ".[] | select(.tvdbId==$tvdbId)")"

Loading…
Cancel
Save