From 4d2d1c8566829b3436868b6e1e0bf981df347b71 Mon Sep 17 00:00:00 2001 From: RandomNinjaAtk Date: Thu, 27 Oct 2022 09:29:49 -0400 Subject: [PATCH] v1.0.002 - Adjust pagesize to more reasonable size... --- root/scripts/QueueCleaner.bash | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/root/scripts/QueueCleaner.bash b/root/scripts/QueueCleaner.bash index 6533f07..c5e65fa 100644 --- a/root/scripts/QueueCleaner.bash +++ b/root/scripts/QueueCleaner.bash @@ -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)" @@ -26,7 +26,7 @@ log () { echo $m_time" :: QueueCleaner :: "$1 } -arrQueueData="$(curl -s "$arrUrl/api/v1/queue?page=1&pagesize=1000000000&sortDirection=descending&sortKey=progress&includeUnknownArtistItems=true&apikey=${arrApiKey}" | jq -r .records[])" +arrQueueData="$(curl -s "$arrUrl/api/v1/queue?page=1&pagesize=200&sortDirection=descending&sortKey=progress&includeUnknownArtistItems=true&apikey=${arrApiKey}" | jq -r .records[])" arrQueueIds=$(echo "$arrQueueData" | jq -r 'select(.status=="completed") | select(.trackedDownloadStatus=="warning") | .id') arrQueueIdsCount=$(echo "$arrQueueData" | jq -r 'select(.status=="completed") | select(.trackedDownloadStatus=="warning") | .id' | wc -l) if [ $arrQueueIdsCount -eq 0 ]; then @@ -40,7 +40,7 @@ else done fi -arrQueueData="$(curl -s "$arrUrl/api/v1/queue?page=1&pagesize=1000000000&sortDirection=descending&sortKey=progress&includeUnknownArtistItems=true&apikey=${arrApiKey}" | jq -r .records[])" +arrQueueData="$(curl -s "$arrUrl/api/v1/queue?page=1&pagesize=200&sortDirection=descending&sortKey=progress&includeUnknownArtistItems=true&apikey=${arrApiKey}" | jq -r .records[])" arrQueueIds=$(echo "$arrQueueData" | jq -r 'select(.status=="failed") | select(.trackedDownloadStatus=="warning") | .id') arrQueueIdsCount=$(echo "$arrQueueData" | jq -r 'select(.status=="failed") | select(.trackedDownloadStatus=="warning") | .id' | wc -l) if [ $arrQueueIdsCount -eq 0 ]; then