feat: add arr-cli skill — Radarr + Sonarr media library CLI #13
No reviewers
Labels
No labels
community-feedback
enhancement
skill-upgrade
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
magnus/agent-skills!13
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/arr-cli-skill"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Two CLIs, one skill wrapper. radarr-cli for movies (list, lookup, calendar, collections), sonarr-cli for TV series (list, lookup, episodes, calendar, wanted).
All cli-builder patterns.
Signed-off-by: Jasper magnus@groktop.us
test
Automated Review — Jasper
🐛 Bug:
ConnectionErrorwill never catch request failuresSeverity: Medium — Both
radarr-cliandsonarr-clicatch bareConnectionErrorin their_get()and_post()methods. This is the Python built-inbuiltins.ConnectionError, butrequestsraisesrequests.exceptions.ConnectionErroron connection failures. The except clause will never fire, and the user will see an unhandled traceback instead of the friendly error message.Fix: Change
except ConnectionError→except requests.exceptions.ConnectionErrorin all four locations (_get× 2 +_post× 2 across both files).🎨 Style:
idshadows built-inIn
radarr-clicmd_calendar(), variableid = m.get("tmdbId","")shadows Python's built-inid(). Minor, but the rest of the file usestidortmdb_idfor TMDb IDs — keep consistent.♻️ Duplication between CLIs
~80% shared infrastructure (
_preparse,emit/die/log/warnhelpers,_get/_postmethods, error handling, and dry-run logic). This is acceptable per cli-builder's self-contained binary principle, but if a third arr CLI appears (Readarr, Lidarr, etc.), extract a sharedarr_base.py.📦 Dead code:
_post()andadd_movie()/add_series()_post(),add_movie(), andadd_series()exist but no CLI command calls them. Not an issue — useful for future expansion — but worth noting the gap if write commands are intended.⚙️
cmd_wantedalways requests page 1cmd_wanted()callsclient.wanted_missing(limit=parsed.limit)but never passespage. For users with many missing episodes, only the first page is returned. Known Gotchas documents pagination, so this is documented — but adding a--pageflag would be a natural enhancement.Overall: Solid cli-builder patterns throughout —
_preparse,emit()dual-output, lazy auth, stderr hygiene. The ConnectionError bug is the one that needs fixing before merge. Everything else is style or future enhancement.