From dc78c1d131c5a82039bbacd0364203ebd842d92c Mon Sep 17 00:00:00 2001 From: Devin Buhl Date: Fri, 9 Aug 2024 16:48:18 -0400 Subject: [PATCH] fix: tba sonarr problem solved question mark question mark Signed-off-by: Devin Buhl --- .../main/apps/default/sonarr/app/resources/refresh-series.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kubernetes/main/apps/default/sonarr/app/resources/refresh-series.sh b/kubernetes/main/apps/default/sonarr/app/resources/refresh-series.sh index ec7658a235c87..f88c7233b1ec8 100755 --- a/kubernetes/main/apps/default/sonarr/app/resources/refresh-series.sh +++ b/kubernetes/main/apps/default/sonarr/app/resources/refresh-series.sh @@ -5,7 +5,7 @@ if [[ "${sonarr_eventtype:-}" == "Grab" ]]; then tba_count=$(curl -fsSL \ --header "X-Api-Key: ${SONARR__AUTH__APIKEY}" \ "http://localhost:${SONARR__SERVER__PORT}/api/v3/episode?seriesId=${sonarr_series_id}" \ - | jq --raw-output '.[] | select((.title == "TBA") or (.title == "TBD"))' | jq --slurp 'length') + | jq --raw-output '[.[] | select((.title == "TBA") or (.title == "TBD"))] | length') if (( tba_count > 0 )); then echo "INFO: Refreshing series ${sonarr_series_id} due to TBA/TBD episodes found"