feat(transmission): add Transmission torrent client integration - #18
feat(transmission): add Transmission torrent client integration#18jeromelefeuvre wants to merge 1 commit into
Conversation
New download-client page alongside qBittorrent — setup wizard step, admin settings, sidebar badge/poll, health circuit breaker — modeled on the same conventions but with its own JSON-RPC transport, since Transmission's session handshake (expected HTTP 409 carrying a fresh X-Transmission-Session-Id to cache and retry with) is genuinely novel versus qBittorrent's cookie auth. Also fixes three bugs found while smoke-testing the new client: - SetupController's Downloads step defaults were non-empty, so qBittorrent showed as "configured" even when untouched. - DashboardController's services-health labels lacked a Transmission entry, so its chip never appeared. - A user-entered URL with a redundant /transmission suffix doubled up with the client's own /transmission/rpc path; normalizeBaseUrl() strips it. - torrent-get on a large library (this user has ~1,900 torrents) is multiple MB of uncompressed JSON, slow enough over a remote link to time out mid-transfer and silently render as "0 torrents". Requesting gzip via CURLOPT_ENCODING shrinks that response ~14x. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
First — this is genuinely well-built. I read That said, I'm not going to merge it as it stands. The blockers are about what the fork can carry, not about the code: 1. It conflicts. The branch is based on 2. 1,967 of the 4,226 lines are 3. The manual smoke test is unchecked, and no CI ran on the branch ( 4. Strategic: upstream has no Transmission integration, so this is net-new fork-only divergence on top of several existing fork-only features. Deluge is already sitting in Shoshuo#76 waiting on a maintainer decision — I'd rather see how that lands before adding a third client here. Small unrelated thing while I was reading: the None of this is a hard no. If you want to take it forward, the order I'd suggest is: rebase onto current Either way, thanks for the care that went into this — it's clear you read the codebase rather than pattern-matching at it. |
Absorbs jeromelefeuvre's Transmission contribution (fork PR #18), rebased onto post-UniFi main with the contributed client and controller carried as authored. The page template is rebuilt on the Deluge base plus the shared partials rather than the contributed qBittorrent-derived copy; qBittorrent and Deluge are untouched. Adds guard tests for the registration points and Deluge/Transmission route parity, plus a render test — nothing in CI previously rendered any torrent template, because ServiceRouteGuardSubscriber redirects to the setup wizard under AbstractWebTestCase and the smoke test only asserts status < 500. 956 tests, live-verified on :beta against Transmission 4.1.3.
|
Landed on First, a correction to my earlier review. I said the template was a blocker because it "would leave three near-identical torrent templates in the tree." That was wrong, and it was the load-bearing part of my objection. What changed, and why. I rebased The translation block went from 208 keys per locale to 15. That follows the Deluge precedent, which reuses the Your client and controller went in as authored, with two exceptions worth naming:
The parts I'd single out as genuinely good, having now read them closely: the 409 handshake is correct and non-obvious, and it works against a real daemon — I verified it live against Transmission 4.1.3. Keeping 401 separate from the breaker matters more than it looks; it's the only thing stopping a wrong RPC password from blackholing the service. And your registration coverage was better than most of my own first passes — you hit every list in Two things your PR indirectly surfaced that were already broken and are now fixed or filed. Nothing in CI ever rendered any torrent template — If you do want Transmission in Prismarr generally rather than just this fork, upstream is still the better target — same as you did with Shoshuo#80 and Shoshuo#82. Happy to point at this branch if it helps. Thanks again. Closing this since the rebase changed the SHA and GitHub won't do it automatically. |
Summary
TransmissionClientspeaks Transmission's JSON-RPC protocol over a single/transmission/rpcendpoint, handling itsX-Transmission-Session-IdCSRF handshake (an expected409is not a failure — the response header carries the token to retry with) and HTTP Basic auth forrpc-authentication-required.TransmissionControllermirrorsDelugeController's route set (list/detail/actions/bulk/add-by-url/add-by-file/global limits).HealthService(dashboard health chip + wizard "Test" button, with409→ok/401→authdiagnosis),ServiceRouteGuardSubscriber,ConfigExtension,DisplayPreferencesService/DisplayPreferencesExtension(per-page refresh interval),AdminSettingsController(settings fields, kill-switch),SetupController(downloads wizard step), sidebar nav, and EN/FR translations.transmission/index.html.twigscaffolded from the existing qBittorrent template (table/filters/stat-cards/modals), minus the qBit-only Gluetun/VPN panel.Test plan
docker exec prismarr php bin/console lint:twig— all 169 Twig templates validdocker exec -e APP_ENV=test prismarr php bin/phpunit— 863 tests, 2341 assertions, 0 failuresTransmissionClientTest,TransmissionControllerTest, plus additions toControllersSmokeTest,ServiceRouteGuardSubscriberTest,HealthServiceDiagnoseTest🤖 Generated with Claude Code