mirror of
https://github.com/Glitchy-Sheep/boosty-downloader.git
synced 2026-10-14 21:33:23 +00:00
[PR #188] [MERGED] [downloader] Remember the content types that finished when a chunk fails #187
Labels
No labels
api-drift
bug
ci
documentation
enhancement
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Glitchy-Sheep/boosty-downloader#187
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Glitchy-Sheep/boosty-downloader/pull/188
Author: @Glitchy-Sheep
Created: 9/13/2026
Status: ✅ Merged
Merged: 9/13/2026
Merged by: @Glitchy-Sheep
Base:
main← Head:fix/cache-finished-content-types📝 Commits (1)
28147ca[downloader] Cache the content types that finished when another one fails📊 Changes
4 files changed (+246 additions, -134 deletions)
View changed files
📝
CHANGELOG.md(+1 -0)📝
boosty_downloader/application/use_cases/download_single_post.py(+111 -49)📝
test/e2e/download_flow_test.py(+11 -2)📝
test/unit/use_cases/parallel_media_test.py(+123 -83)📄 Description
📝 Summary
Audit stage 4, part 2 of 3: audit item 19.1. A post with one dead link used to be dropped whole and re-downloaded from scratch on every one of the 5 attempts and on the next run: a post with a 2 GB video and one broken attachment transferred that video five times.
🔧 What changes
gatherwithreturn_exceptions); failures are collected instead of stopping the siblings. The retry starts only after all chunks finished, so there is no race to cancel against.post.htmlis rendered when every chunk that belongs on the page made it. A failed attachment does not block it (attachments are not on the page); a failed image, video or audio does, and the page waits for the retry.🧪 Tests
parallel_media_test: a dead file lets the siblings finish, the page renders,post_contentis cached andfilesis not; a dead image blocks the page whilefilesis cached; concurrency cap, order and Ctrl+C contract unchanged.download_flow_testwith one 404: the first attempt asks for image, file, video, audio, the second for the file only (5 media requests in total), the tree and the statistics are the same as a clean run.task cigreen locally: ruff, pyright strict, import-linter, 255 tests + e2e.--dry-runafterwards promisesfiles 3and no images; run 2 serves 9 posts from the cache and downloads 0 media while the same post fails again on its files.failed_downloads.logholds exactly the three files.⏭️ Next
PR 3:
--post-urlthrough the post retrier (retries, expired-link refresh, containment), URL parsing up front with a mismatch check, 429 retries at the transport.✅ Checklist
--helpand README if neededdocs/if the download flow or dev process changed## Unreleasedin CHANGELOG.md (or theci/skip-changeloglabel if not user-facing)🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.