romarr-mcp: import_path (adopt a file with an explicit platform) #23

Merged
luis merged 1 commits from feat/romarr-mcp-import into main 2026-11-07 08:15:47 +01:00
Collaborator

One tool, 27 lines, POST /api/v1/manualimport.

ROMarr 1.8.0's import sweep cannot match a SABnzbd job to its queue row: download_id is a UUID while SAB reports its nzo_id, and the exact-title fallback is gated on not identity_conflicts(item), which is bool(job and download_id) — always true for SAB. The row is skipped silently and the file sits in complete/. Transmission.completed() is missing entirely, so torrents fare worse.

adopt bypasses all of that: it takes a path and a platform and puts the file in the library, with the platform winning over the header guess (an ISO9660 PS2 disc reports itself as psx).

import_path {"path": "/mnt/media/sabnzbd/complete/<release>", "platform": "ps2"}

Verified against a throwaway ROMarr 1.8.0:

  • tools/list → 22 tools, import_path present, write: true
  • missing path → {"ok": false, "reason": "/nonexistent/x.iso does not exist"} (the request reaches ROMarr)
  • empty platform → error: platform is required (e.g. ps2) -- the header guess is unreliable
  • real call → resolved platform: ps2 to the Folder library and refused only on content: no Sony PlayStation 2 ROM among 1 file(s), i.e. the whole chain runs and validation is left to ROMarr
  • force is passed through for the case where a valid dump trips the heuristic

Read-only mode still refuses it, like every other write tool.

One tool, 27 lines, `POST /api/v1/manualimport`. ROMarr 1.8.0's import sweep cannot match a SABnzbd job to its queue row: `download_id` is a UUID while SAB reports its `nzo_id`, and the exact-title fallback is gated on `not identity_conflicts(item)`, which is `bool(job and download_id)` — always true for SAB. The row is skipped silently and the file sits in `complete/`. `Transmission.completed()` is missing entirely, so torrents fare worse. `adopt` bypasses all of that: it takes a path and a platform and puts the file in the library, with the platform winning over the header guess (an ISO9660 PS2 disc reports itself as `psx`). ``` import_path {"path": "/mnt/media/sabnzbd/complete/<release>", "platform": "ps2"} ``` Verified against a throwaway ROMarr 1.8.0: - `tools/list` → 22 tools, `import_path` present, `write: true` - missing path → `{"ok": false, "reason": "/nonexistent/x.iso does not exist"}` (the request reaches ROMarr) - empty platform → `error: platform is required (e.g. ps2) -- the header guess is unreliable` - real call → resolved `platform: ps2` to the Folder library and refused only on content: `no Sony PlayStation 2 ROM among 1 file(s)`, i.e. the whole chain runs and validation is left to ROMarr - `force` is passed through for the case where a valid dump trips the heuristic Read-only mode still refuses it, like every other write tool.
hermes-agent added 1 commit 2026-11-07 01:13:23 +01:00
romarr-mcp: import_path, adopt a file with an explicit platform
NixOS Configuration CI / Nix Flake Check (pull_request) Successful in 19s
361683fc2b
luis merged commit df8848ecf2 into main 2026-11-07 08:15:47 +01:00
luis deleted branch feat/romarr-mcp-import 2026-11-07 08:15:50 +01:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: luis/mcp-servers#23