[PR #149] [MERGED] [downloader] Recognize ondemand video types and skip stream-only videos honestly #153

Closed
opened 2026-10-13 19:48:03 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Glitchy-Sheep/boosty-downloader/pull/149
Author: @Glitchy-Sheep
Created: 8/15/2026
Status: ✅ Merged
Merged: 8/15/2026
Merged by: @Glitchy-Sheep

Base: main ← Head: feat/ondemand-video-types


📝 Commits (3)

  • 2aa7c9a feat: Recognize the ondemand_* video url types
  • 5af97cc fix: Skip stream-only videos with a warning instead of a silent drop
  • 89a9956 docs: Note the ondemand video types in the changelog

📊 Changes

10 files changed (+134 additions, -9 deletions)

View changed files

📝 CHANGELOG.md (+5 -0)
📝 boosty_downloader/src/application/mappers/post_mapper.py (+12 -1)
📝 boosty_downloader/src/application/ok_video_ranking.py (+21 -0)
📝 boosty_downloader/src/application/use_cases/download_single_post.py (+5 -0)
📝 boosty_downloader/src/infrastructure/boosty_api/models/post/post_data_types/post_data_ok_video.py (+2 -0)
📝 boosty_downloader/src/infrastructure/boosty_api/utils/validation_errors.py (+1 -1)
📝 test/unit/boosty_api/ok_video_types_test.py (+9 -1)
📝 test/unit/boosty_api/validation_errors_test.py (+2 -2)
📝 test/unit/download_manager/ok_video_ranking_test.py (+29 -2)
📝 test/unit/mappers/post_mapper_test.py (+48 -2)

📄 Description

Summary

Boosty added two new video url types: ondemand_dash and ondemand_hls. Every run over a post with them nagged "please report this at GitHub". The client now knows these types. Selection also got a safety rule: only progressive mp4 formats are downloadable, and a video with nothing but streaming manifests is skipped with an honest warning.

Problem

  • The unknown-content reporter fired on ondemand_* at every check and download. The videos themselves downloaded fine - the warning was pure noise.
  • A live probe showed these types come with empty urls even with full access: Boosty rolled out the words, not the content.
  • Selection had a trap: with no mp4 available it silently fell back to hls/dash manifest urls, and download_file saved the manifest text to disk as a fake video.

Fix

  • ondemand_hls / ondemand_dash join the enum at the bottom of the ranking. The report-to-github warning no longer fires for them.
  • get_best_video picks from an explicit allowlist of 8 progressive mp4 types. A manifest url can never reach the file downloader. New types stay non-downloadable until recognized.
  • A video with only stream urls warns Skip video (streams are not supported yet): <title> and retries next run. If Boosty starts serving downloadable urls, it downloads by itself.
  • A video with no urls at all keeps the old silent drop - a stream warning there would lie.
  • Tests that need an unknown url type use a fictional imaginary_* word.

Before / After

Before: every check / download over such posts prints unknown-content warnings and asks to report them.

After: the same commands are quiet, videos download exactly as before, and a stream-only video says honestly that streams are not supported yet.

Verification

  • Live check over a real blog with these types: the ondemand warnings are gone.
  • Live download of a video post: a genuine ISO Media MP4 lands on disk - no manifests, no warnings.
  • A live authorized API probe confirmed the ondemand_* urls are empty for every probed video, so nothing downloadable is skipped.
  • 6 new unit tests: the types parse, manifests are never selected, the worst mp4 beats the best manifest, stream-only warns and retries, url-less stays silent.
  • Full task ci green: checks, 113 unit tests, 6 live integration tests, build.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Glitchy-Sheep/boosty-downloader/pull/149 **Author:** [@Glitchy-Sheep](https://github.com/Glitchy-Sheep) **Created:** 8/15/2026 **Status:** ✅ Merged **Merged:** 8/15/2026 **Merged by:** [@Glitchy-Sheep](https://github.com/Glitchy-Sheep) **Base:** `main` ← **Head:** `feat/ondemand-video-types` --- ### 📝 Commits (3) - [`2aa7c9a`](https://github.com/Glitchy-Sheep/boosty-downloader/commit/2aa7c9ad4e10189c6c8054ee6b6d515cd7b488a6) feat: Recognize the ondemand_* video url types - [`5af97cc`](https://github.com/Glitchy-Sheep/boosty-downloader/commit/5af97ccbfd67094c3fa0a3e000166824b73429f3) fix: Skip stream-only videos with a warning instead of a silent drop - [`89a9956`](https://github.com/Glitchy-Sheep/boosty-downloader/commit/89a9956833e5ef53105da1160db49edcd000b69a) docs: Note the ondemand video types in the changelog ### 📊 Changes **10 files changed** (+134 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+5 -0) 📝 `boosty_downloader/src/application/mappers/post_mapper.py` (+12 -1) 📝 `boosty_downloader/src/application/ok_video_ranking.py` (+21 -0) 📝 `boosty_downloader/src/application/use_cases/download_single_post.py` (+5 -0) 📝 `boosty_downloader/src/infrastructure/boosty_api/models/post/post_data_types/post_data_ok_video.py` (+2 -0) 📝 `boosty_downloader/src/infrastructure/boosty_api/utils/validation_errors.py` (+1 -1) 📝 `test/unit/boosty_api/ok_video_types_test.py` (+9 -1) 📝 `test/unit/boosty_api/validation_errors_test.py` (+2 -2) 📝 `test/unit/download_manager/ok_video_ranking_test.py` (+29 -2) 📝 `test/unit/mappers/post_mapper_test.py` (+48 -2) </details> ### 📄 Description ## Summary Boosty added two new video url types: `ondemand_dash` and `ondemand_hls`. Every run over a post with them nagged "please report this at GitHub". The client now knows these types. Selection also got a safety rule: only progressive mp4 formats are downloadable, and a video with nothing but streaming manifests is skipped with an honest warning. ## Problem - The unknown-content reporter fired on `ondemand_*` at every check and download. The videos themselves downloaded fine - the warning was pure noise. - A live probe showed these types come with empty urls even with full access: Boosty rolled out the words, not the content. - Selection had a trap: with no mp4 available it silently fell back to `hls`/`dash` manifest urls, and `download_file` saved the manifest text to disk as a fake video. ## Fix - `ondemand_hls` / `ondemand_dash` join the enum at the bottom of the ranking. The report-to-github warning no longer fires for them. - `get_best_video` picks from an explicit allowlist of 8 progressive mp4 types. A manifest url can never reach the file downloader. New types stay non-downloadable until recognized. - A video with only stream urls warns `Skip video (streams are not supported yet): <title>` and retries next run. If Boosty starts serving downloadable urls, it downloads by itself. - A video with no urls at all keeps the old silent drop - a stream warning there would lie. - Tests that need an unknown url type use a fictional `imaginary_*` word. ## Before / After **Before:** every `check` / `download` over such posts prints unknown-content warnings and asks to report them. **After:** the same commands are quiet, videos download exactly as before, and a stream-only video says honestly that streams are not supported yet. ## Verification - Live `check` over a real blog with these types: the ondemand warnings are gone. - Live download of a video post: a genuine `ISO Media MP4` lands on disk - no manifests, no warnings. - A live authorized API probe confirmed the `ondemand_*` urls are empty for every probed video, so nothing downloadable is skipped. - 6 new unit tests: the types parse, manifests are never selected, the worst mp4 beats the best manifest, stream-only warns and retries, url-less stays silent. - Full `task ci` green: checks, 113 unit tests, 6 live integration tests, build. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-13 19:48:03 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Glitchy-Sheep/boosty-downloader#153
No description provided.