Skip to content

Accept qBittorrent 5.2 torrent-add responses - #295

Closed
ColeTown wants to merge 3 commits into
kikootwo:mainfrom
ColeTown:codex/qbittorrent-add-response
Closed

ColeTown wants to merge 3 commits into
kikootwo:mainfrom
ColeTown:codex/qbittorrent-add-response

Conversation

@ColeTown

@ColeTown ColeTown commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

qBittorrent 5.2 returns a JSON receipt after adding a torrent (upstream change). RMAB currently requires Ok., so it reports a failure even when the client accepted the download.

Accept both formats for magnets and .torrent uploads. JSON receipts must confirm exactly the submitted hash, with one success and no failures or pending additions. Existing duplicate handling stays unchanged.

Validation covers both upload paths over local HTTP with real Axios and torrent parsing: legacy/JSON success, malformed or mismatched receipts, pending additions, HTTP errors and existing downloads. The JSON success cases reproduce the bug against unchanged main. Full test suite, TypeScript, Next.js production build and isolated Docker image build pass.

Developed with AI assistance using OpenAI Codex (GPT-6 Astra), with human review.

@kikootwo

Copy link
Copy Markdown
Owner

Thanks @ColeTown. I checked this against qBittorrent 5.2's change and it holds up, including the strict receipt checks. Landing it as is, with you as co-author.

Leaving this open until it lands.

kikootwo added a commit that referenced this pull request Oct 20, 2026
Re-land of #295. qBittorrent 5.2 answers /api/v2/torrents/add with a JSON receipt instead of Ok.; both upload paths now accept Ok. or a receipt confirming exactly the submitted hash (one success, no failures, nothing pending). Rejected receipts are logged with their content. Documents the hybrid/base32 hash limit as a follow-up.

Co-authored-by: Cole Townsend <33290898+ColeTown@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kikootwo

Copy link
Copy Markdown
Owner

@ColeTown this landed in #420 with you as co-author, and it'll be in the next release. Thanks again!

Two small additions on top: a rejected receipt is now logged with its content, so a hash mismatch shows the ID qBittorrent returned, and the docs note the hybrid/base32 hash limit, which is tracked in #422.

@kikootwo kikootwo closed this Oct 20, 2026
@kikootwo kikootwo mentioned this pull request Oct 20, 2026
@kikootwo

Copy link
Copy Markdown
Owner

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.

2 participants