Update QueueCleaner.bash
This commit is contained in:
parent
19118b8de8
commit
6a43634745
1 changed files with 6 additions and 6 deletions
|
@ -61,16 +61,16 @@ QueueCleanerProcess () {
|
||||||
arrQueueItemTitle="$(echo "$arrQueueItemData" | jq -r .title)"
|
arrQueueItemTitle="$(echo "$arrQueueItemData" | jq -r .title)"
|
||||||
if [ "$arrName" == "Sonarr" ]; then
|
if [ "$arrName" == "Sonarr" ]; then
|
||||||
arrEpisodeId="$(echo "$arrQueueItemData" | jq -r .episodeId)"
|
arrEpisodeId="$(echo "$arrQueueItemData" | jq -r .episodeId)"
|
||||||
arrEpisodeData="$(curl -s "$arrUrl/api/v3/episode/$arrEpisodeId?apikey=${arrApiKey}")"
|
arrEpisodeData="$(curl -s "$arrUrl/api/v3/episode/$arrEpisodeId?apikey=${arrApiKey}")"
|
||||||
arrEpisodeTitle="$(echo "$arrEpisodeData" | jq -r .title)"
|
arrEpisodeTitle="$(echo "$arrEpisodeData" | jq -r .title)"
|
||||||
arrEpisodeSeriesId="$(echo "$arrEpisodeData" | jq -r .seriesId)"
|
arrEpisodeSeriesId="$(echo "$arrEpisodeData" | jq -r .seriesId)"
|
||||||
if [ "$arrEpisodeTitle" == "TBA" ]; then
|
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}")
|
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
|
continue
|
||||||
fi
|
fi
|
||||||
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}")
|
deleteItem=$(curl -sX DELETE "$arrUrl/api/v3/queue/$queueId?removeFromClient=true&blocklist=true&apikey=${arrApiKey}")
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue