Skip to content

Commit

Permalink
fix: tba sonarr problem solved question mark question mark
Browse files Browse the repository at this point in the history
Signed-off-by: Devin Buhl <[email protected]>
  • Loading branch information
onedr0p committed Aug 9, 2024
1 parent 5134622 commit dc78c1d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit dc78c1d

Please sign in to comment.