Update QueueCleaner.bash

This commit is contained in:
RandomNinjaAtk 2023-03-18 10:58:48 -04:00 committed by GitHub
parent 19118b8de8
commit 6a43634745
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -65,12 +65,12 @@ QueueCleanerProcess () {
arrEpisodeTitle="$(echo "$arrEpisodeData" | jq -r .title)"
arrEpisodeSeriesId="$(echo "$arrEpisodeData" | jq -r .seriesId)"
if [ "$arrEpisodeTitle" == "TBA" ]; then
log "ERROR :: Episode title is \"$arrEpisodeTitle\" and prevents auto-import, refreshing series..."
log "$queueId ($arrQueueItemTitle) :: ERROR :: Episode title is \"$arrEpisodeTitle\" and prevents auto-import, refreshing series..."
refreshSeries=$(curl -s "$arrUrl/api/v3/command" -X POST -H 'Content-Type: application/json' -H "X-Api-Key: $arrApiKey" --data-raw "{\"name\":\"RefreshSeries\",\"seriesId\":$arrEpisodeSeriesId}")
continue
fi
fi
log "Removing Failed Queue Item ID: $queueId ($arrQueueItemTitle) from $arrName..."
log "$queueId ($arrQueueItemTitle) :: Removing Failed Queue Item from $arrName..."
deleteItem=$(curl -sX DELETE "$arrUrl/api/v3/queue/$queueId?removeFromClient=true&blocklist=true&apikey=${arrApiKey}")
done
fi