fix(transmission): poll the audiobook category as well as the ebook one - #2712
Open
ccarpinteri wants to merge 2 commits into
Open
ccarpinteri wants to merge 2 commits into
ccarpinteri wants to merge 2 commits into
Conversation
…orrent id torrent-add returns a numeric id that only lasts as long as the daemon session. Transmission renumbers every torrent when it restarts, but Bindery stored that id as the download's TorrentID and the poller looked downloads up by it. After a restart the id matches nothing, so the poller skips the row and the download sits at "downloading" for good while the torrent carries on seeding. Nothing imports it. Ids are also reused, so a stored id can come back pointing at a different torrent, and then the wrong payload is imported and the wrong torrent is acted on. This stores hashString instead, which stays the same for the life of the torrent, and looks downloads up by it. The RPC takes a hash anywhere it takes an id, so removal works off the same value. Stall detection and the queue's live progress overlay are keyed by hash too, since both compare against the stored value. Stall detection gets no numeric fallback because the caller removes what it matches; the overlay keeps one because it only draws a row. Rows written before this change still hold a numeric id. They are matched by comparing Transmission's addedDate with the download's grab time, which a restart does not change, and only when the pairing is clear: a torrent no download is close to is left alone, a torrent one download is close to is assigned, and a torrent several downloads are close to needs the release name to pick one or it is left for the user. The row is then rewritten to the hash, the same way the qBittorrent hash recovery in vavallee#939 works. The stale id is never used to find the torrent. Leaving a download stuck can be undone, removing the wrong torrent cannot. Terminal downloads are skipped: they will not be imported or removed again, so rewriting their identifier can only be wrong. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
checkTransmissionDownloads only fetched torrents under client.Category. When CategoryAudiobook is set, audiobook grabs go to that category instead, so the poller never saw them and those downloads stayed at "downloading" for good. It now polls every category CategoriesToPoll returns, the same set the other clients already poll, and keeps a torrent once if both categories return it. The zero-match warning names the audiobook category too, so a mismatch there is as visible as one on the ebook category. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
ccarpinteri
force-pushed
the
pr/transmission-poll-audiobook-category
branch
from
September 19, 2026 03:09
55377ad to
b785e51
Compare
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
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.
Problem
checkTransmissionDownloadsonly fetches torrents underclient.Category:When
CategoryAudiobookis set, audiobook grabs go to that category instead. The poller never sees them, so those downloads stay at "downloading" for good even though the torrent is sitting in the client and finishes normally.The other clients already poll both through
CategoriesToPoll. Transmission was missed.Change
Poll every category
CategoriesToPollreturns. The two can overlap, so a torrent returned by both is kept once. The zero match warning now names the audiobook category too, so a mismatch there is as visible as one on the ebook category.Tests
Existing
importersuite passes. The two macOS failures I see locally also fail on a clean checkout of main.Note on ordering
Stacks on #2711. The diff touches the same few lines of
checkTransmissionDownloads, so it is easier to review after that one. Happy to rebase it onto main on its own if you would rather take it first.🤖 Generated with Claude Code