From ae8a929a92655ed47a92ae889f8c1553b65bf1c5 Mon Sep 17 00:00:00 2001 From: poprhythm Date: Wed, 9 Sep 2026 12:15:27 +0000 Subject: [PATCH] Fix second Argument-list-too-long spot in cmd_import The command_id extraction passed the full command-submission response (which echoes back the whole files array) as a python argv arg - same ARG_MAX issue as the api_post fix, one step later. Now piped via stdin. The actual command submission already worked with the first fix; this only affected reading back the response. Claude-Session: https://claude.ai/code/session_01HZQK6jHmdTpFjFZM8FUnqA --- sonarr.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sonarr.sh b/sonarr.sh index e40eaa7..d4764fc 100755 --- a/sonarr.sh +++ b/sonarr.sh @@ -301,7 +301,7 @@ print(json.dumps({'name': 'ManualImport', 'files': files, 'importMode': 'auto'}) local response response=$(api_post "command" "$payload") local command_id - command_id=$(python3 -c "import json,sys; print(json.loads(sys.argv[1])['id'])" "$response") + command_id=$(echo "$response" | python3 -c "import json,sys; print(json.load(sys.stdin)['id'])") # Poll for completion for _ in $(seq 1 30); do