mirror of
https://github.com/Glitchy-Sheep/boosty-downloader.git
synced 2026-10-15 05:41:48 +00:00
[PR #195] [MERGED] [html] Render attachments as file cards #192
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#192
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/195
Author: @Glitchy-Sheep
Created: 9/20/2026
Status: ✅ Merged
Merged: 9/20/2026
Merged by: @Glitchy-Sheep
Base:
main← Head:feat/attachment-cards📝 Commits (1)
10c88bb[html] Render attachments as file cards📊 Changes
12 files changed (+312 additions, -15 deletions)
View changed files
📝
CHANGELOG.md(+4 -0)📝
boosty_downloader/application/mappers/html_converter.py(+3 -3)📝
boosty_downloader/application/use_cases/download_single_post.py(+3 -1)📝
boosty_downloader/infrastructure/html_generator/models.py(+2 -0)📝
boosty_downloader/infrastructure/html_generator/renderer.py(+114 -4)➕
boosty_downloader/infrastructure/html_generator/templates/attachments.html(+11 -0)📝
boosty_downloader/infrastructure/html_generator/templates/base.html(+46 -1)➖
boosty_downloader/infrastructure/html_generator/templates/file.html(+0 -1)📝
test/e2e/download_flow_test.py(+4 -1)📝
test/fixtures/rendered_post.html(+62 -2)📝
test/unit/html_generator/html_templates_test.py(+59 -0)📝
test/unit/use_cases/page_elements_test.py(+4 -2)📄 Description
📝 Summary
Follow-up to #191: attachments in
post.htmlbecome file cards, so a file reads as a file and not as one more link or a second player.🔧 What changes
File · MP4 · 29.7 KBline with the type and the size the API reported. Unknown size or a name without a usable extension just drop that part of the line.mimetypes, the same table the videotype=attribute already uses. The size arrives from the domain (PostDataChunkFile.size) throughHtmlGenFile.size.file.htmlis replaced byattachments.html;render_htmlgroups neighbouringHtmlGenFilechunks,render_html_chunkrenders a block of one.💡 Why
After #191 a post with an mp4 attachment next to a Boosty video player showed a player and a bare link with the same name, and it was not clear that the link is a file. The API sends both as separate chunks (a player and a file attachment), so the page mirrors the post; the card makes the difference visible instead of hiding one of them.
🧪 Tests
v1.2 (final)is not a type), neighbouring files in one block with the order kept.task cigreen locally: ruff, pyright strict, import-linter, 289 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.