Skip to content

fix(qbittorrent): send the four Advanced Settings to the client - #926

Open
m4bard wants to merge 1 commit into
Listenarrs:canaryfrom
m4bard:fix/898-qbittorrent-advanced-settings
Open

fix(qbittorrent): send the four Advanced Settings to the client#926
m4bard wants to merge 1 commit into
Listenarrs:canaryfrom
m4bard:fix/898-qbittorrent-advanced-settings

Conversation

@m4bard

@m4bard m4bard commented Sep 1, 2026

Copy link
Copy Markdown

Fixes #898.

Initial State, Sequential Order, First and Last First and Content Layout saved and reloaded correctly and reached qBittorrent in no form at all. QbittorrentTorrentAddPlan had no field for any of them, so there was no route from the settings blob to the add request. The plan carries them now and the content builder emits them on both the file and the magnet path.

I checked these against a running client rather than the docs

I ran a throwaway qBittorrent 5.2.3, Web API 2.15.1, added a torrent with each parameter and read the state back. Two of the four cannot be got right from documentation alone.

paused has been ignored since Web API 2.11, where it became stopped. A build implementing this from the older docs would have produced a setting that still did nothing, in a section where nothing worked, which is a bad way to find out. Both names are sent: 4.x reads paused and ignores stopped, and 5.x does the reverse. That is cheaper and less brittle than asking the client its version first.

contentLayout is case sensitive. The stored values are lowercase, so passing them straight through leaves the torrent on its default layout with no error at all. They are mapped to Original, Subfolder and NoSubfolder.

Force start is not accepted on the add call at all. Sending it there succeeds and does nothing. The workflow makes a setForceStart call after the add instead, and only warns if that one fails, because the torrent is already added by then and losing a good download over an optional priority tweak would be the worse outcome.

Only options the user chose are sent, so Default still means the client's own preference rather than this code's idea of one.

Tests

Ten, including the case where nothing is configured, so the parameters cannot quietly become always-present.

Dropping the options entirely fails five of the ten. Passing contentLayout through unchanged fails three. Sending only paused fails one.

Verified again end to end with all four set together against the live instance: state stoppedDL, seq_dl true, f_l_piece_prio true, and the folder stripped.


Worked through with Claude Code at my direction. The claims above were checked by running them rather than by reading, and I reviewed this before posting.

Initial State, Sequential Order, First and Last First and Content Layout saved
and reloaded correctly and reached qBittorrent in no form at all.
QbittorrentTorrentAddPlan had no field for any of them, so there was no route
from the settings blob to the add request. The plan carries them now and the
content builder emits them on both the file and the magnet path.

I ran a throwaway qBittorrent 5.2.3, Web API 2.15.1, and checked each parameter
by adding a torrent with it and reading the state back, because two of them
cannot be got right from the documentation.

"paused" has been ignored since Web API 2.11, where it became "stopped". A build
implementing this from the older docs would have produced a setting that still
did nothing, in a section where nothing worked, which is a bad way to find out.
Both names are sent. 4.x reads "paused" and ignores "stopped"; 5.x does the
reverse. That is cheaper and less brittle than asking the client its version.

"contentLayout" is case sensitive. The stored values are lowercase, so passing
them straight through leaves the torrent on its default layout with no error.
They are mapped to Original, Subfolder and NoSubfolder.

Force start is not accepted on the add call. Sending it there succeeds and does
nothing. The workflow makes a setForceStart call after the add instead, and only
warns if that fails, since the torrent is already added and losing a good
download over an optional priority tweak would be worse.

Only options the user chose are sent, so Default still means the client's own
preference rather than this code's idea of one.

Controls: dropping the options entirely fails five of the ten tests, passing
contentLayout through unchanged fails three, and sending only "paused" fails one.

Verified again end to end against the live instance with all four set together:
state stoppedDL, seq_dl true, f_l_piece_prio true, and the folder stripped.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YEVQ7qDJLk5196MFeggWuA
@m4bard
m4bard requested a review from a team September 1, 2026 03:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The qBittorrent Advanced Settings section saves four values that never reach qBittorrent

1 participant