Torrent workflows
Torrent workflows connect the desktop client to a Transmission daemon, which is the remote service that manages torrents. The client uses Transmission RPC, its request protocol, for intake, review, change, and relocation. The main window keeps the selected torrent and its detail views in step with the daemon after each action.
Workflow model
The torrent list is the starting point for most work. A selection identifies the current torrent, and the detail pane then loads the view that the user opens: general information, files, peers, trackers, or statistics.
The client treats the daemon as the source of truth. It sends changes through Transmission RPC and asks for new data after a successful change. This keeps list rows, file choices, tracker data, and location data aligned with the remote torrent rather than with an uncommitted local copy. main.pas coordinates selection and detail refresh, while rpc.pas schedules the related daemon queries. (main.pas#L4645-L4681, main.pas#L5205-L5226, rpc.pas#L266-L345)
The broad workflow is:
- Connect to the daemon and choose a torrent or an intake source.
- Review the torrent or its available files.
- Submit one or more changes to the daemon.
- Refresh the list and detail views so the result becomes visible.
flowchart LR
A[Connect to Transmission] --> B[Choose torrent or source]
B --> C{User goal}
C -->|Add| D[Review intake choices]
C -->|Inspect| E[Load detail view]
C -->|Change| F[Edit torrent settings]
C -->|Relocate| G[Choose new location]
D --> H[Send RPC change]
E --> I[Show current daemon data]
F --> H
G --> H
H --> J[Refresh affected views]
Torrent intake
Torrent intake brings a torrent into the daemon from a local file, a remote URL, or a magnet-style link. The client gathers the source data, lets the user choose the remote download location and file set, and then creates the torrent in a paused state before applying the final choices.
The intake path also handles sources that arrive outside the add dialog. File-open actions, watched inputs, and optional clipboard monitoring place sources into a pending queue. The same add workflow then processes them in order, with watched inputs able to use a configured destination without waiting for the normal confirmation dialog.
For the detailed source rules and the data sent to Transmission, see Torrent intake.
Intake stages
The intake flow first obtains or reads the source. It then asks the daemon to create the torrent and uses the returned torrent identity to apply file selection, peer limits, and an optional name change. A user choice to start the torrent is sent only after those settings are complete.
The file view represents folders and files together. Selecting a folder changes the state of its files, and the client sends wanted and unwanted file IDs as one follow-up change. A magnet link can lack metadata at first, so its file view and size may remain unavailable until Transmission receives the metadata.
References: main.pas• L2422-2435 main.pas• L2438-2662 main.pas• L2718-2995 addtorrent.pas• L247-495 addtorrent.pas• L1034-1070
Torrent inspection
Inspection turns the selected torrent into a set of focused views. The general view presents progress, transfer data, errors, tracker state, identity, and dates; the files, peers, and trackers views expose the related remote details; and the statistics view presents session data when the daemon supports it.
Changing the selected row clears the old detail state and requests data for the new torrent. Changing tabs requests the matching detail kind. This makes inspection an on-demand view of daemon data instead of a separate record that can drift from the list.
Detail views
The detail pane covers these user questions:
| View | User question |
|---|---|
| General | What is the torrent doing and how much work remains? |
| Files | Which files exist, and which files are wanted? |
| Peers | Which peers are connected and exchanging data? |
| Trackers | Which trackers exist and what is their current state? |
| Statistics | What session-level transfer data is available? |
The files view also supports path actions. The client builds a remote path from the torrent location and the selected file or folder so that the user can copy it or request an open action. Local opening depends on a configured mapping between remote and local paths.
References: main.pas• L4645-4720 main.pas• L5205-5226 main.pas• L6855-6870 main.pas• L6872-7100 main.pas• L7102-7179 rpc.pas• L565-626 rpc.pas• L666-799
Torrent changes
Torrent changes update the daemon-owned settings or activity state for one or more selected torrents. The list supplies the selection, an editor or action gathers the requested values, and the client sends the change through a common RPC action path before refreshing the list or detail pane.
The main change groups are:
| Change group | Result |
|---|---|
| Activity | Start, stop, force start, reannounce, or verify the selected torrents. |
| Transfer policy | Set download and upload limits, peer limits, seed ratio rules, or idle seed rules. |
| File policy | Set file priority or mark files as wanted or unwanted. |
| Identity and grouping | Rename a torrent or set its labels. |
| Tracker set | Add, replace, or remove tracker entries. |
The property editor supports multiple selected torrents for settings that can be applied as a group. It also converts the tracker text back into explicit add, replace, and remove changes, so an edit does not need to resend unchanged entries. See Torrent details and location for property and file changes, and Tracker management for tracker-specific behavior.
Change submission
The client checks the selected torrent and the connected daemon before it exposes each action. After a successful change it requests the data needed by the affected view. File changes also invalidate the current file payload so that a later file refresh cannot show the old wanted state.
When a request fails, the client keeps the existing view and reports the RPC or connection status. It does not treat the dialog state as proof that the daemon accepted the change.
References: main.pas• L3759-3860 main.pas• L4097-4365 main.pas• L7450-7531 main.pas• L7625-7633 rpc.pas• L1398-1407
Torrent relocation
Relocation changes the remote download location for one or more torrents. The user chooses a destination through the remote-folder selector and can choose whether Transmission also moves the existing data.
The client sends the selected torrent IDs with the new location and the move choice. After Transmission accepts the request, the client marks file details as changed and polls until the selected rows report the new path. This final check matters because the RPC response confirms acceptance before the list necessarily shows the completed location update.
Location change stages
The relocation flow follows these stages:
- Select one or more torrents that have a known download path.
- Enter or browse to the new remote destination.
- Choose whether to move the downloaded data.
- Submit the location change to Transmission.
- Refresh until the selected torrents show the new destination.
The feature requires a daemon RPC version that supports location changes. The dialog rejects an empty destination before it sends the request. The destination is remote, so a local folder picker is not a substitute for the remote-folder selector.
References: main.pas• L2144-2229 main.pas• L5650-5660 movetorrent.pas• L40-96 rpc.pas• L1398-1407
Workflow links
The child pages split the end-to-end view into the three areas that need deeper treatment:
- Torrent intake explains local files, URLs, magnet links, watched inputs, and source cleanup.
- Torrent details and location explains detail views, torrent properties, file choices, priorities, naming, and relocation.
- Tracker management explains tracker inspection and tracker set changes.
Change checklist
When these files or sections are changed, remember to consider these:
- Keep every mutation's follow-up refresh aligned with the data it changes. File changes need file-payload invalidation, while list-only changes need the torrent list refreshed.
- Keep the daemon-version gates in the action state and in the visible controls aligned. A control that remains visible without a supported RPC field can fail only after the user submits it.
- Keep intake's temporary source handling separate from the daemon's torrent identity. A duplicate add can target an existing torrent and still require tracker reconciliation.
- Keep remote path handling consistent between intake, relocation, file display, and open/copy-path actions. The daemon path is not always a local filesystem path.
- Keep selection and detail refresh guards aligned so a response for an earlier torrent cannot replace the current torrent's details.
Important failure modes
| Trigger | Consequence | Guard |
|---|---|---|
| No daemon connection is available when an add starts | The intake cannot create the torrent or load its initial settings | Add actions require a connection, and intake tries to connect before it opens the add flow. |
| A daemon does not support a requested RPC feature | The action is hidden or disabled, or the related detail is not available | UI action state and visibility use the negotiated RPC version. |
| A magnet has not received metadata | File choices and full size are not yet available | Keep the intake view in metadata-pending state and let later refreshes supply the files. |
| The add source matches a torrent already on the daemon | No new torrent is created; the existing torrent may be offered tracker updates | Handle the duplicate response as an existing torrent and reconcile only new trackers. |
| A location change is accepted but the list refresh is not complete | The old path can remain visible for a short time | Invalidate file details and refresh until selected rows report the destination. |
| The user changes selection while detail data is in flight | Old data could overwrite the new selection | Match detail responses to the current torrent and detail generation before applying them. |
Key files
| File | Why to read it |
|---|---|
main.pas | Main workflow coordinator for selection, intake, detail views, torrent changes, tracker edits, and relocation. |
addtorrent.pas | Intake review model for destination, file selection, wanted state, and start choice. |
movetorrent.pas | Relocation dialog contract for a remote destination and data-move choice. |
addtracker.pas | Small tracker add and edit dialog used by the tracker workflow. |
torrprops.pas | Property editor surface for per-torrent transfer and seeding rules plus tracker text. |
rpc.pas | Shared daemon query, mutation transport, detail refresh, and stale-response control. |