From bdec8beea9ab9f8ad93d63a6b00226376093c3f8 Mon Sep 17 00:00:00 2001 From: RandomNinjaAtk Date: Tue, 21 Jun 2022 19:12:32 +0000 Subject: [PATCH] 1.0.0047 - pause until all lidarr tasks are complete --- root/scripts/download.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/root/scripts/download.sh b/root/scripts/download.sh index 433b88d..60ba0f1 100644 --- a/root/scripts/download.sh +++ b/root/scripts/download.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -scriptVersion="1.0.0046" +scriptVersion="1.0.0047" lidarrUrlBase="$(cat /config/config.xml | xq | jq -r .Config.UrlBase)" if [ "$lidarrUrlBase" = "null" ]; then lidarrUrlBase="" @@ -1112,7 +1112,7 @@ LidarrTaskStatusCheck () { until false do taskCount=$(curl -s "$lidarrUrl/api/v1/command?apikey=${lidarrApiKey}" | jq -r .[].status | grep -v completed | grep -v failed | wc -l) - if [ "$taskCount" -gt "3" ]; then + if [ "$taskCount" -ge "1" ]; then sleep 1 else break