From 335dae554b8f8052d6a4ca78110bd4c7e7aae731 Mon Sep 17 00:00:00 2001 From: Barrett Clark Date: Mon, 30 Mar 2026 06:18:25 -0500 Subject: [PATCH 1/2] fixes #407 [Lidarr] Exclude isLongRunning commands from LidarrTaskStatusCheck ProcessMonitoredDownloads is a Lidarr background task with isLongRunning=true that never completes. The previous jq filter counted all started commands, causing the Audio script to wait forever. Filter out long-running tasks so only user-initiated commands block the script. --- lidarr/Audio.service.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lidarr/Audio.service.bash b/lidarr/Audio.service.bash index 32a62831..c29c0de3 100644 --- a/lidarr/Audio.service.bash +++ b/lidarr/Audio.service.bash @@ -1723,7 +1723,7 @@ LidarrTaskStatusCheck () { alerted=no until false do - taskCount=$(curl -s "$arrUrl/api/v1/command?apikey=${arrApiKey}" | jq -r '.[] | select(.status=="started") | .name' | wc -l) + taskCount=$(curl -s "$arrUrl/api/v1/command?apikey=${arrApiKey}" | jq '[.[] | select(.status=="started") | select(.body.isLongRunning != true)] | length') if [ "$taskCount" -ge "1" ]; then if [ "$alerted" == "no" ]; then alerted=yes From 4c00f11f601a752344275873a8af393a370aa4a7 Mon Sep 17 00:00:00 2001 From: Barrett Clark Date: Mon, 30 Mar 2026 09:02:01 -0500 Subject: [PATCH 2/2] Refine fix: exclude ProcessMonitoredDownloads by commandName not isLongRunning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DownloadedAlbumsScan is also isLongRunning=true and must be waited on — it triggers the actual album import. Excluding all isLongRunning commands was too broad. Exclude ProcessMonitoredDownloads by name specifically. --- lidarr/Audio.service.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lidarr/Audio.service.bash b/lidarr/Audio.service.bash index c29c0de3..147ce99b 100644 --- a/lidarr/Audio.service.bash +++ b/lidarr/Audio.service.bash @@ -1723,7 +1723,7 @@ LidarrTaskStatusCheck () { alerted=no until false do - taskCount=$(curl -s "$arrUrl/api/v1/command?apikey=${arrApiKey}" | jq '[.[] | select(.status=="started") | select(.body.isLongRunning != true)] | length') + taskCount=$(curl -s "$arrUrl/api/v1/command?apikey=${arrApiKey}" | jq '[.[] | select(.status=="started") | select(.commandName != "Process Monitored Downloads")] | length') if [ "$taskCount" -ge "1" ]; then if [ "$alerted" == "no" ]; then alerted=yes