Introducing a new way to review your PRs.

Read the announcement

transmission-remote-gui / transgui

🧲 A feature rich cross platform Transmission BitTorrent client. Faster and has more functionality than the built-in web GUI.

View on GitHub

19 documents · Updated Sep 25, 2026

docs / tracker-management

Tracker management

Tracker management lets an engineer view and change the announce URLs that a torrent uses to find peers. The desktop client reads the selected torrent's tracker data from Transmission, presents tracker health in the details pane, and sends focused torrent-set changes back to the daemon.

Tracker view

The tracker view is the Trackers tab in the torrent details pane. Each row represents one tracker and gives the user its announce URL, current status, time until the next update, and known seed count. The view is populated for the selected torrent and refreshed from Transmission's trackers and trackerStats data. main.lfm, rpc.pas, main.pas

Tracker status describes the latest announce state rather than a permanent property of the URL. An update in progress is shown as Updating; a successful announce is shown as Working; and a failed announce uses the server's last announce result. Stopped or finished torrents may not have live tracker status or seed data to show. main.pas

The list also removes rows that are no longer present in the latest server response. This keeps the editing target aligned with the tracker's current server-assigned ID. main.pas, main.pas

References: main.lfm• L881-918 rpc.pas• L607-625 main.pas• L7102-7215

Tracker editing actions

The tracker list exposes three user actions: add a tracker, edit the selected tracker, and remove the selected tracker. The same actions are available from the tracker's context menu; double-click edits the selected row and the Delete key removes it. These actions apply to the current torrent only. main.lfm, main.lfm, main.pas

Tracker addition

Adding a tracker opens a small dialog for one announce URL. The dialog trims surrounding white space and refuses an empty value. After confirmation, the client sends the URL as trackerAdd for the current torrent. addtracker.pas, addtracker.pas, main.pas

References: addtracker.pas• L40-43 addtracker.pas• L67-82 main.pas• L8111-8155

Tracker replacement

Editing a tracker starts with the selected row's URL and its server-assigned tracker ID. After confirmation, the client sends a trackerReplace pair containing that ID and the new URL. This preserves the identity of the tracker while changing its announce address. main.pas

References: main.pas• L8111-8141

Tracker removal

Removing a tracker asks for confirmation and then sends its server-assigned ID in trackerRemove. The client does not remove a tracker by matching its displayed URL. A successful change triggers a refresh so the list reflects the daemon's result. main.pas

References: main.pas• L2047-2076

References: addtracker.pas• L40-43 addtracker.pas• L67-82 main.pas• L2047-2076 main.pas• L8111-8155

Tracker set editing

The torrent properties dialog provides a broader tracker-set edit flow. It loads the current tracker URLs and IDs into an editable list. On save, it compares the edited list with the original set and sends only the needed additions, replacements, and removals. main.pas, main.pas, main.pas

The comparison treats blank lines as absent trackers and leaves unchanged URLs out of the request. New lines become trackerAdd values. Remaining old entries become trackerRemove IDs. Other changed positions become trackerReplace ID/URL pairs. This lets one save operation express a complete set edit without resending unchanged entries. main.pas

This broader edit is available only when the connected daemon supports the tracker mutation fields. The UI enables tracker actions at RPC version 10 or later, and older daemons hide the related tracker controls. main.pas

References: main.pas• L4102-4135 main.pas• L4208-4222 main.pas• L4285-4348 main.pas• L5678-5684

RPC change flow

Tracker changes use Transmission's torrent-set method. The request identifies the current torrent with ids and carries one or more tracker mutation fields; the method returns no change payload, so the client refreshes the torrent details after success. rpc-spec.txt, main.pas, main.pas

The tracker display follows a separate read path. The RPC worker requests the selected torrent's tracker list, tracker statistics, and next announce time. The main form then maps that response into the tracker grid. This separation means a successful write becomes visible only after the next read confirms the daemon's state. rpc.pas, rpc.pas, main.pas

The client reports a failed write through its normal RPC status path and does not treat the local grid as authoritative. A connection failure or daemon error therefore leaves the server-side tracker set unchanged until a later successful request. main.pas, main.pas, rpc.pas

This diagram shows how a tracker edit moves from the details view to Transmission and back into the refreshed view.

flowchart LR
    A[Selected torrent] --> B[Trackers tab or properties]
    B --> C[Validate and compare URLs]
    C --> D[torrent-set with trackerAdd, trackerReplace, or trackerRemove]
    D --> E{RPC success?}
    E -- No --> F[Show RPC status]
    E -- Yes --> G[Request torrent details refresh]
    G --> H[Rebuild tracker view from server data]

References: rpc-spec.txt• L90-125 rpc.pas• L299-323 rpc.pas• L607-625 main.pas• L2047-2076 main.pas• L8111-8155

Tracker changes are one part of the wider torrent workflow. Use Torrent workflows for the overall lifecycle, Torrent intake for adding torrents and handling tracker data found during intake, Torrent details and location for the surrounding details and property flows, and Transmission RPC integration for the shared connection and request model.

Change checklist

When these files or sections are changed, remember to consider these:

  • Keep the tracker grid's displayed row identity aligned with the tracker IDs used by trackerReplace and trackerRemove.
  • Keep the tracker edit diff rules aligned with Transmission's trackerAdd, trackerReplace, and trackerRemove argument shapes.
  • Keep the RPC-version gate aligned with the daemon versions that support tracker mutation fields.
  • Keep successful tracker writes tied to a details refresh so stale URLs and IDs do not remain editable.
  • Keep tracker status rendering aligned with the presence or absence of trackerStats on older RPC versions.

Important failure modes

TriggerConsequenceGuard
The tracker row is stale when a remove or replace action startsThe request can target an old tracker IDRefresh tracker data and use the row's current server-assigned ID.
The add dialog contains only white spaceAn empty tracker URL would be sent to the daemonTrim the value and reject it before the dialog closes.
The daemon does not support tracker mutation fieldsAdd, edit, and remove requests are not availableEnable tracker actions only for RPC version 10 or later.
torrent-set returns an RPC or connection errorThe server-side tracker set is not changed and the view may still show the prior stateShow the RPC status and refresh only after a successful response.
A stopped or finished torrent has no live tracker statisticsStatus and seed cells do not represent current announce activityLeave those values empty or unavailable instead of treating them as live data.

Key files

FileWhy to read it
main.pasCoordinates the tracker view, single-tracker actions, set editing, RPC version gates, and refresh behavior.
addtracker.pasDefines the URL entry and validation step used by add and edit actions.
main.lfmShows the Trackers tab, its columns, and the context-menu action surface.
rpc.pasShows how tracker data is requested and delivered to the main form.
rpc-spec.txtDefines the torrent-set tracker mutation fields and their request shapes.