mirror of
https://github.com/Glitchy-Sheep/boosty-downloader.git
synced 2026-10-14 21:33:23 +00:00
[PR #129] [MERGED] [downloader] Keep every video when a post has several of them #133
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#133
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/129
Author: @Glitchy-Sheep
Created: 8/9/2026
Status: ✅ Merged
Merged: 8/9/2026
Merged by: @Glitchy-Sheep
Base:
main← Head:fix/unique-video-filenames📝 Commits (2)
c702fadfix: 🐛 Boosty video chunks carry their unique API ide8d3728fix: 🐛 Multiple videos in one post no longer overwrite each other📊 Changes
7 files changed (+46 additions, -1 deletions)
View changed files
📝
CHANGELOG.md(+1 -0)📝
boosty_downloader/src/application/mappers/ok_boosty_video.py(+1 -0)📝
boosty_downloader/src/application/use_cases/download_single_post.py(+7 -1)📝
boosty_downloader/src/domain/post_data_chunks.py(+3 -0)📝
boosty_downloader/src/infrastructure/boosty_api/models/post/post_data_types/post_data_ok_video.py(+1 -0)📝
test/unit/mappers/post_mapper_test.py(+2 -0)➕
test/unit/use_cases/video_filename_test.py(+31 -0)📄 Description
Summary
A post with two or more videos used to end up with a single file: all of them were written under the same name, and the last one won. Now every video filename carries the video id, so names cannot collide.
Fixes #104
Problem
'wb'and overwrites without a warning - earlier videos were lost silentlyFix
idfor every video - the client now parses it and hands it down to the domainMy stream (a2dd6942): the id suffix is always there, so a name never depends on the neighbouring videosvideo (a2dd6942)instead of a bare bracketBefore / After
Before: a post with 3 videos leaves 1 file on disk, the other 2 are lost without a trace.
After: 3 videos - 3 files, each with a stable unique name.
Tests
test_videos_with_the_same_title_get_different_filenames- the #104 collision itselftest_empty_title_falls_back_to_video_with_id- nameless videos stay readable and uniqueidfield on every postNotes
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.