Repository navigation
fix: accept qBittorrent 5.2 torrent-add responses - #420
Merged
Merged
Conversation
qBittorrent 5.2 answers /api/v2/torrents/add with a JSON receipt instead of the plain "Ok." text, so ReadMeABook reported a failed grab even when the client had accepted the torrent. Both the magnet and .torrent upload paths now accept either the legacy text or a receipt that confirms exactly the hash we submitted: one success, no failures, nothing pending. Anything else is still an error. Re-lands #295 by @ColeTown. Co-authored-by: Cole Townsend <33290898+ColeTown@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A rejected JSON receipt was interpolated as "[object Object]", so the log never showed which ID qBittorrent returned. Rejection messages now keep text bodies as they are and serialize JSON (capped at 500 chars). The 202 and 409 tests now also assert that the upload happened, and qbittorrent.md records the known 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>
This was referenced Oct 20, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Linked issue
Re-lands #295 by @ColeTown, who wrote the original fix and is credited as co-author on these commits. #295 gets closed once this merges. Reported in #317.
What changed
qBittorrent 5.2 (WebAPI 2.14 and later) answers
/api/v2/torrents/addwith a JSON receipt instead of the plainOk.text (upstream change), so RMAB reported a failed grab even when qBittorrent had accepted the torrent..torrentupload paths now accept eitherOk.or a receipt that confirms exactly the hash RMAB submitted: one success, no failures, nothing pending. Anything else is still an error, and the existing duplicate handling is unchanged.[object Object], so a hash mismatch shows the ID qBittorrent returned.documentation/phase3/qbittorrent.md: for hybrid (v1+v2) torrents on libtorrent-2 builds, and for base32 magnets, qBittorrent's receipt carries a different hash than the one RMAB computes, so those adds are still reported as failed. Tracking those torrents didn't work before 5.2 either. That's a separate follow-up.Checks
main.main: the full unit suite in the Node 24 test container passes (297 files, 3,998 passed, 5 skipped), and so do the image build, the smoke test and an end-to-end import spec (3/3).Risk and rollback
Ok., which is accepted as before.Release note
🤖 Generated with Claude Code