Catch importBlocked in arrs_failed_stalled_recovery.sh

Recovery script only matched importFailed/importPending/error/stalled, so
releases matched to the wrong media by grab-history ID (Sonarr/Radarr's
importBlocked state) sat forever, invisible to automated cleanup.
This commit is contained in:
Gmer4Lfe
2026-07-14 18:12:38 -04:00
parent 958391e326
commit ed4d194332
+10 -1
View File
@@ -13,9 +13,16 @@
# OPERATIONAL MODEL
# ==============================================================================================
#
# Four problem types detected from the arr queue API:
# Five problem types detected from the arr queue API:
# importFailed — downloaded but arr couldn't import the file
# importPending — downloaded, stuck waiting to import (will not self-resolve)
# importBlocked — downloaded, but arr matched the release to the wrong media
# by grab-history ID instead of by title and refuses to import
# (permanent block, never self-resolves — same handling as
# importFailed since most real-world cases are junk/duplicate
# releases; the rare case where the file is actually good but
# mis-parsed will just get re-searched instead of manually
# imported, an acceptable tradeoff for hands-free operation)
# error status — serious failure not covered by the above two states
# stalled — download stuck with no connections or no progress
#
@@ -332,6 +339,7 @@ process_arr() {
(
.trackedDownloadState == "importFailed" or
.trackedDownloadState == "importPending" or
.trackedDownloadState == "importBlocked" or
.trackedDownloadStatus == "error" or
(.status == "warning" and (
(.errorMessage // "" | ascii_downcase | contains("stalled")) or
@@ -368,6 +376,7 @@ process_arr() {
case "$tracked_state" in
importFailed) problem_type="import failed" ;;
importPending) problem_type="import pending/stuck" ;;
importBlocked) problem_type="import blocked (matched by ID)" ;;
*)
[[ "$tracked_status" == "error" ]] && \
problem_type="error" || problem_type="stalled"