From cf376ec38172e63403dd0cc3c85d302a49d26b64 Mon Sep 17 00:00:00 2001 From: RandomNinjaAtk Date: Sat, 3 Jun 2023 09:17:26 -0400 Subject: [PATCH] 1.0.6 - bug fix #248 --- root/scripts/AutoArtistAdder.bash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/root/scripts/AutoArtistAdder.bash b/root/scripts/AutoArtistAdder.bash index 5d38c50..893b830 100644 --- a/root/scripts/AutoArtistAdder.bash +++ b/root/scripts/AutoArtistAdder.bash @@ -1,5 +1,5 @@ #!/usr/bin/env bash -scriptVersion="1.0.5" +scriptVersion="1.0.6" if [ -z "$lidarrUrl" ] || [ -z "$lidarrApiKey" ]; then lidarrUrlBase="$(cat /config/config.xml | xq | jq -r .Config.UrlBase)" if [ "$lidarrUrlBase" == "null" ]; then @@ -178,7 +178,7 @@ LidarrTaskStatusCheck () { alerted=no until false do - taskCount=$(curl -s "$lidarrUrl/api/v1/command?apikey=${lidarrApiKey}" | jq -r .[].status | grep -v completed | grep -v failed | wc -l) + taskCount=$(curl -s "$lidarrUrl/api/v1/command?apikey=${lidarrApiKey}" | jq -r '.[] | select(.status=="started") | .name' | wc -l) if [ "$taskCount" -ge "1" ]; then if [ "$alerted" == "no" ]; then alerted=yes