mirror of
https://github.com/Glitchy-Sheep/boosty-downloader.git
synced 2026-10-14 21:33:23 +00:00
[PR #196] [MERGED] [downloader] Write post.html even when a piece is missing #195
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#195
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/196
Author: @Glitchy-Sheep
Created: 9/20/2026
Status: ✅ Merged
Merged: 9/20/2026
Merged by: @Glitchy-Sheep
Base:
main← Head:fix/page-with-placeholders📝 Commits (3)
5e7e33c[html] Add a placeholder for a media piece that did not download5405689[downloader] Write post.html even when a piece is missingf82eaea[docs] Describe placeholders for missing media📊 Changes
14 files changed (+374 additions, -27 deletions)
View changed files
📝
CHANGELOG.md(+5 -0)📝
README.md(+1 -0)📝
boosty_downloader/application/post_retry.py(+1 -0)📝
boosty_downloader/application/use_cases/download_single_post.py(+69 -12)📝
boosty_downloader/infrastructure/html_generator/__init__.py(+4 -0)📝
boosty_downloader/infrastructure/html_generator/models.py(+27 -1)📝
boosty_downloader/infrastructure/html_generator/renderer.py(+12 -1)📝
boosty_downloader/infrastructure/html_generator/templates/base.html(+36 -0)➕
boosty_downloader/infrastructure/html_generator/templates/unavailable.html(+10 -0)📝
docs/concepts/boosty/download-flow.md(+3 -1)📝
test/e2e/download_flow_test.py(+48 -3)📝
test/fixtures/rendered_post.html(+51 -0)📝
test/unit/html_generator/html_templates_test.py(+39 -0)📝
test/unit/use_cases/parallel_media_test.py(+68 -9)📄 Description
📝 Summary
Groundwork for #76. A post with one piece that will not download stays readable.
🔧 What changes
post.htmlis always written from what landed.post_contentstays out of the cache while the hole is there. The retry and the next run process the post again and rewrite the page. The cache rule of #188 is unchanged.💡 Why
Before, one failed image, video or audio meant no
post.htmlat all. The text of the post was saved nowhere. A permanent failure left the post unreadable forever.Bug fixed on the way
A page rewritten after a retry lost the videos, audio and files of the first attempt: their content types were already cached, the retry skipped them, the rewrite had nothing to show. The use case now keeps the page elements of every attempt and rewrites the page from all of them. A post rebuilt with fresh signed links takes the page over. The new e2e test caught it.
🚫 Not changed on purpose
📚 Docs
docs/concepts/boosty/download-flow.md: when the page is written, what a placeholder means, why such a page is never cached, the in-run memory and the cross-run limit.🧪 Tests
post_contentuncached; a successful retry rewrites the page without it; a retry keeps the elements of the earlier attempt, also after a rebuild for fresh links.task cigreen locally: ruff, pyright strict, import-linter, 293 tests + e2e.✅ 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.