grep -c prints zero and exits one, so every echo-0 fallback produced a two-line count
This commit is contained in:
@@ -327,7 +327,7 @@ ARTIST_RESPONSE=$(arr_get_tracked_data "lidarr" "$LIDARR_URL" "$LIDARR_API_KEY"
|
||||
}
|
||||
|
||||
ARTIST_IDS=$(echo "$ARTIST_RESPONSE" | jq -r '.[].id' 2>/dev/null)
|
||||
ARTIST_COUNT=$(echo "$ARTIST_IDS" | grep -c "[0-9]" 2>/dev/null || echo 0)
|
||||
ARTIST_COUNT=$(echo "$ARTIST_IDS" | grep -c "[0-9]" 2>/dev/null || true)
|
||||
|
||||
# Safety Layer 4 — artist count > 0
|
||||
if [[ "$ARTIST_COUNT" -eq 0 ]]; then
|
||||
|
||||
Reference in New Issue
Block a user