Repository navigation
Conversation
…rupted transfers
A release is blocklisted when a transfer is judged failed, but nothing on the
Sources page said so, a block could only be removed from Settings, and removing
it could not continue the transfer that was already on the downloader.
- Sources page (and release details): a blocked release shows why it is blocked,
cannot be downloaded, and administrators can Unblock it, or Unblock and resume
when an interrupted transfer is still on the downloader.
- POST /api/acquisition/recovery/blocklist/{id}/resume removes the block and, for a
held attempt whose recovery gave up, reverses the recovery bookkeeping so the
existing attempt observes the existing transfer again. It never adds a torrent.
A replacement already in flight or finished, a problem reported by a person,
another covering block, or a withdrawn/satisfied request refuse the resume
(the block is still removed and the transfer is untouched).
- A single extra leading folder added by the client (qBittorrent "Subfolder"
content layout) is no longer a mismatch with the inspected torrent, and the
inspection path includes it. This was the false "Completed files differ from
the inspected torrent" hold that blocklisted a complete download.
Refs logabell#110
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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
A release is blocklisted when a transfer is judged failed, but:
In my case the block was a false positive (see #110 and the layout change below), so a complete download was stuck until I imported it by hand.
What this does
Blocked: <reason> (found automatically|reported <date>), its Download button is disabled with a reason, and administrators get Unblock (same as the Settings button) and, when an interrupted transfer is still on the downloader, Unblock and resume. Members see the reason but no buttons.POST /api/acquisition/recovery/blocklist/{block_id}/resume(admin): removes the block and, for a held attempt whose recovery gave up (DownloadRecovery.state == "held", selection cancelled), reverses the recovery bookkeeping in one transaction: re-commits the selection and reservation, deletes the recovery row, re-runsevaluate, and queues a check of the existing attempt. It never adds a torrent and the old hash claim keeps ownership. The existingDELETEendpoint is unchanged in behaviour.Refused (the block is still removed and the transfer is left exactly as it was): a replacement search or download already followed the failure, a person reported the problem, another active block covers the release, the request is withdrawn/paused/already satisfied (the whole reversal rolls back), or the attempt is no longer held.
GETsearch results gainblock(id,reason,automatic,blocked_at,can_resume), computed with one query per page (release_blocklist.blocks_for).layout_wrapper()indomain/download_attempts.py): a single extra leading folder that the client added around the torrent's own paths (qBittorrent's "Subfolder" content layout wraps every single-file torrent) is no longer a mismatch with the inspected torrent. Same files, same sizes, exactly one added folder. The inspection path includes the wrapper. Renames, extra or missing files, different sizes, mixed prefixes and./../backslash wrappers are still mismatches. This is what caused the false "Completed files differ from the inspected torrent" hold in [UX] From Quick add to library: six dead ends with misleading or missing guidance (language 'und', .DS_Store, disk reserve, unverified route) #110.Tests
tests/unit/test_download_layout.py: wrapper detection (including every rejection case),transfer_stagewith wrapped, truncated, renamed, extra-file and wrong-total transfers, inspection paths.tests/integration/test_download_resume.py(PostgreSQL): resume of the same attempt through a wrapped layout tocompletewith an inspection and no secondsubmit; second resume is a no-op; plain removal leaves the failed transfer alone; recoveries inqueued/searching/selecting/retried/completeare not touched; a reported problem is never resumed; a second covering block keeps the release blocked; a withdrawn request rolls the whole resume back; non-held attempts are not candidates; 404 for unknown blocks; members get 403; the Sources view lists the block on exactly the blocked release (and not for another format or after removal).apps/web/tests/ui/release-blocklist.spec.ts: blocked row with reason and disabled Download, plain Unblock, Unblock and resume with outcome, refused resume message, member view.reading-accounts.spec.ts, Goodreads onboarding, a click timeout in code this PR does not touch) failed on the first attempt and passed on a re-run of that job.docs/openapi.jsonandapps/web/src/api/schema.d.tsregenerated.Not included / notes
held(gave up) state is intentionally not resumable: a replacement may already be in flight. Those are ignored by the resume screen rather than refused with a message.contentLayout=Originalidea in [UX] From Quick add to library: six dead ends with misleading or missing guidance (language 'und', .DS_Store, disk reserve, unverified route) #110's follow-up: this tolerates a wrapper that already exists; asking qBittorrent for the original layout at add time prevents it for new torrents.Refs #110
🤖 Generated with Claude Code