diff --git a/root/scripts/QueueCleaner.bash b/root/scripts/QueueCleaner.bash index 59675e0..6b93f66 100644 --- a/root/scripts/QueueCleaner.bash +++ b/root/scripts/QueueCleaner.bash @@ -1,5 +1,5 @@ #!/usr/bin/env bash -scriptVersion="1.0.009" +scriptVersion="1.0.010" if [ -z "$arrUrl" ] || [ -z "$arrApiKey" ]; then arrUrlBase="$(cat /config/config.xml | xq | jq -r .Config.UrlBase)" @@ -29,7 +29,7 @@ log () { CleanerProcess () { - arrQueueData="$(curl -s "$arrUrl/api/v3/queue?page=1&pagesize=200&sortDirection=descending&sortKey=progress&includeUnknownSeriesItems=true&apikey=${arrApiKey}" | jq -r .records[])" + arrQueueData="$(curl -s "$arrUrl/api/v3/queue?page=1&pagesize=200&sortDirection=descending&sortKey=progress&includeUnknownMovieItems=true&apikey=${arrApiKey}" | jq -r .records[])" arrQueueCompletedIds=$(echo "$arrQueueData" | jq -r 'select(.status=="completed") | select(.trackedDownloadStatus=="warning") | .id') arrQueueIdsCompletedCount=$(echo "$arrQueueData" | jq -r 'select(.status=="completed") | select(.trackedDownloadStatus=="warning") | .id' | wc -l) arrQueueFailedIds=$(echo "$arrQueueData" | jq -r 'select(.status=="failed") | .id') @@ -50,5 +50,4 @@ CleanerProcess () { } CleanerProcess - exit