Report Transmission's live state for arr's own grabs #263

Closed
opened 2026-08-26 11:00:02 +01:00 by naps62-yolo · 0 comments
Owner

Nothing in the HTTP API reports a download. grabs records sent,
downloaded, imported, failed and vanished with no progress column —
correctly, per §8, where progress is transient state rebuilt from Transmission
— but no endpoint exposes even the existence of an in-flight grab. The UI
therefore cannot tell "this season pack is at 40%" from "nothing was ever
grabbed".

GET /api/downloads: one entry per grab whose infohash Transmission still
knows about, carrying

  • target_kind and target_id, so a caller can join it onto the row that
    owns the item
  • infohash and the torrent's name
  • a phase: downloading, stalled, errored, seeding, queued
  • percent complete, download rate, ETA

arr_dl::Torrent today carries progress, state, is_finished and
labels; rate, ETA and Transmission's error string are new fields on the
RPC call. AppState has no Transmission client — Syncer is the precedent
for putting one there (with_syncer / state.rs).

A torrent arr did not grab is never reported (§2, and the design amendment
in this milestone). The join is from grabs, not from Transmission's list.

Cache the snapshot with a short TTL. Every open page polls this on the UI's
existing cadence, and one RPC round trip per poll per client is the thing to
avoid — not the RPC itself, which the reconcile loop already makes every tick.

Non-goals: persisting any of it (no migration, no progress column), and any
control action — pause, resume, remove are Transmission's own UI.

Depends on: #262

Nothing in the HTTP API reports a download. `grabs` records `sent`, `downloaded`, `imported`, `failed` and `vanished` with no progress column — correctly, per §8, where progress is transient state rebuilt from Transmission — but no endpoint exposes even the existence of an in-flight grab. The UI therefore cannot tell "this season pack is at 40%" from "nothing was ever grabbed". `GET /api/downloads`: one entry per grab whose infohash Transmission still knows about, carrying - `target_kind` and `target_id`, so a caller can join it onto the row that owns the item - `infohash` and the torrent's name - a phase: downloading, stalled, errored, seeding, queued - percent complete, download rate, ETA `arr_dl::Torrent` today carries `progress`, `state`, `is_finished` and `labels`; rate, ETA and Transmission's error string are new fields on the RPC call. `AppState` has no Transmission client — `Syncer` is the precedent for putting one there (`with_syncer` / `state.rs`). **A torrent arr did not grab is never reported** (§2, and the design amendment in this milestone). The join is from `grabs`, not from Transmission's list. Cache the snapshot with a short TTL. Every open page polls this on the UI's existing cadence, and one RPC round trip per poll per client is the thing to avoid — not the RPC itself, which the reconcile loop already makes every tick. Non-goals: persisting any of it (no migration, no progress column), and any control action — pause, resume, remove are Transmission's own UI. Depends on: #262
naps62-yolo added this to the Download visibility milestone 2026-08-26 11:00:02 +01:00
naps62-yolo added the area/apidifficulty/moderatephase/5-uitype/feature labels 2026-08-26 11:00:03 +01:00
naps62-yolo added a new dependency 2026-08-26 11:00:35 +01:00
naps62-yolo added a new dependency 2026-08-26 11:00:35 +01:00
naps62-yolo added a new dependency 2026-08-26 11:00:35 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Reference: yolo/arr#263