[PR #219] [MERGED] refactor(api): keep media ids and post metadata #217

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

📋 Pull Request Information

Original PR: https://github.com/Glitchy-Sheep/boosty-downloader/pull/219
Author: @Glitchy-Sheep
Created: 10/3/2026
Status: ✅ Merged
Merged: 10/3/2026
Merged by: @Glitchy-Sheep

Base: main ← Head: feat/keep-media-ids-and-post-details


📝 Commits (2)

  • d376364 refactor(api): keep media ids and chunk details from the API
  • 85b5743 refactor(api): keep tags, teaser, counters and prices of a post

📊 Changes

26 files changed (+382 additions, -54 deletions)

View changed files

📝 boosty_downloader/application/mappers/audio.py (+3 -0)
📝 boosty_downloader/application/mappers/file.py (+1 -0)
📝 boosty_downloader/application/mappers/image.py (+3 -0)
📝 boosty_downloader/application/mappers/ok_boosty_video.py (+2 -0)
📝 boosty_downloader/application/mappers/post_mapper.py (+34 -6)
📝 boosty_downloader/domain/post.py (+25 -1)
📝 boosty_downloader/domain/post_data_chunks.py (+14 -0)
📝 boosty_downloader/infrastructure/boosty_api/models/base.py (+14 -1)
📝 boosty_downloader/infrastructure/boosty_api/models/post/post.py (+33 -3)
📝 boosty_downloader/infrastructure/boosty_api/models/post/post_data_types/post_data_audio.py (+3 -0)
📝 boosty_downloader/infrastructure/boosty_api/models/post/post_data_types/post_data_file.py (+1 -0)
📝 boosty_downloader/infrastructure/boosty_api/models/post/post_data_types/post_data_image.py (+1 -0)
📝 boosty_downloader/infrastructure/boosty_api/models/post/post_data_types/post_data_ok_video.py (+2 -0)
➕ boosty_downloader/infrastructure/boosty_api/models/post/post_overview.py (+28 -0)
📝 boosty_downloader/infrastructure/boosty_api/models/post/subscription_level.py (+6 -11)
📝 test/support/synthetic_post.py (+66 -8)
📝 test/unit/blog_overview/blog_overview_test.py (+2 -2)
➕ test/unit/boosty_api/post_overview_fields_test.py (+46 -0)
📝 test/unit/download_plan/download_plan_test.py (+7 -1)
📝 test/unit/mappers/post_mapper_test.py (+7 -1)

...and 6 more files

📄 Description

📝 Summary

Keep media identities and post metadata from the Boosty API in the domain model. This prepares the data needed by v5 stored post records and library cards.

🔧 What changes

  • Image, file and audio chunks retain their Boosty ids. Image and file DTOs require an id, matching the observed API schema.
  • Media chunks retain image dimensions, audio artist and duration, and Boosty video preview and duration.
  • Posts retain publication time, tags, teaser images, content counts, likes, comments, subscription tier and prices.
  • New optional post overview fields fall back to empty domain values when absent, null or malformed. Teasers use the existing signed-image mapper.

🧪 Tests

  • task ci: Ruff, formatting, Pyright, import boundaries, all 364 unit/e2e tests and wheel/sdist build passed.
  • Synthetic mapping tests check the new fields; the fixture passes the observed API schema checks. New validation cases cover absent, null and malformed overview fields.
  • Public live canary: 2 tests passed. A separate live mapping check parsed all 11 returned posts, including 2 accessible posts, with no skipped posts or mapper failures.
  • Two independent reviews found no blocking issues. Targeted probes also checked required ids, mixed malformed lists, a distinct publication timestamp and a nonzero purchase price.
  • Authenticated integration tests were not run: preflight with the existing local credentials returned Authorization required.

⏭️ Next

Add blog metadata retrieval, then build stored post records and reconciliation from these fields.

✅ Checklist

  • Tested live on a real blog (feature or fix)
  • Updated CLI --help and README if needed
  • Updated docs/ if the download flow or dev process changed
  • Added a line to ## Unreleased in CHANGELOG.md (or the ci/skip-changelog label if not user-facing)

🔄 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/219 **Author:** [@Glitchy-Sheep](https://github.com/Glitchy-Sheep) **Created:** 10/3/2026 **Status:** ✅ Merged **Merged:** 10/3/2026 **Merged by:** [@Glitchy-Sheep](https://github.com/Glitchy-Sheep) **Base:** `main` ← **Head:** `feat/keep-media-ids-and-post-details` --- ### 📝 Commits (2) - [`d376364`](https://github.com/Glitchy-Sheep/boosty-downloader/commit/d376364cfffac0ca93fe64b27d841bb328471afa) refactor(api): keep media ids and chunk details from the API - [`85b5743`](https://github.com/Glitchy-Sheep/boosty-downloader/commit/85b574312a02a6cb5858dd6ddaa8c30ee03079cc) refactor(api): keep tags, teaser, counters and prices of a post ### 📊 Changes **26 files changed** (+382 additions, -54 deletions) <details> <summary>View changed files</summary> 📝 `boosty_downloader/application/mappers/audio.py` (+3 -0) 📝 `boosty_downloader/application/mappers/file.py` (+1 -0) 📝 `boosty_downloader/application/mappers/image.py` (+3 -0) 📝 `boosty_downloader/application/mappers/ok_boosty_video.py` (+2 -0) 📝 `boosty_downloader/application/mappers/post_mapper.py` (+34 -6) 📝 `boosty_downloader/domain/post.py` (+25 -1) 📝 `boosty_downloader/domain/post_data_chunks.py` (+14 -0) 📝 `boosty_downloader/infrastructure/boosty_api/models/base.py` (+14 -1) 📝 `boosty_downloader/infrastructure/boosty_api/models/post/post.py` (+33 -3) 📝 `boosty_downloader/infrastructure/boosty_api/models/post/post_data_types/post_data_audio.py` (+3 -0) 📝 `boosty_downloader/infrastructure/boosty_api/models/post/post_data_types/post_data_file.py` (+1 -0) 📝 `boosty_downloader/infrastructure/boosty_api/models/post/post_data_types/post_data_image.py` (+1 -0) 📝 `boosty_downloader/infrastructure/boosty_api/models/post/post_data_types/post_data_ok_video.py` (+2 -0) ➕ `boosty_downloader/infrastructure/boosty_api/models/post/post_overview.py` (+28 -0) 📝 `boosty_downloader/infrastructure/boosty_api/models/post/subscription_level.py` (+6 -11) 📝 `test/support/synthetic_post.py` (+66 -8) 📝 `test/unit/blog_overview/blog_overview_test.py` (+2 -2) ➕ `test/unit/boosty_api/post_overview_fields_test.py` (+46 -0) 📝 `test/unit/download_plan/download_plan_test.py` (+7 -1) 📝 `test/unit/mappers/post_mapper_test.py` (+7 -1) _...and 6 more files_ </details> ### 📄 Description ## 📝 Summary Keep media identities and post metadata from the Boosty API in the domain model. This prepares the data needed by v5 stored post records and library cards. ## 🔧 What changes - Image, file and audio chunks retain their Boosty ids. Image and file DTOs require an id, matching the observed API schema. - Media chunks retain image dimensions, audio artist and duration, and Boosty video preview and duration. - Posts retain publication time, tags, teaser images, content counts, likes, comments, subscription tier and prices. - New optional post overview fields fall back to empty domain values when absent, null or malformed. Teasers use the existing signed-image mapper. ## 🧪 Tests - `task ci`: Ruff, formatting, Pyright, import boundaries, all 364 unit/e2e tests and wheel/sdist build passed. - Synthetic mapping tests check the new fields; the fixture passes the observed API schema checks. New validation cases cover absent, null and malformed overview fields. - Public live canary: 2 tests passed. A separate live mapping check parsed all 11 returned posts, including 2 accessible posts, with no skipped posts or mapper failures. - Two independent reviews found no blocking issues. Targeted probes also checked required ids, mixed malformed lists, a distinct publication timestamp and a nonzero purchase price. - Authenticated integration tests were not run: preflight with the existing local credentials returned `Authorization required`. ## ⏭️ Next Add blog metadata retrieval, then build stored post records and reconciliation from these fields. ## ✅ Checklist - [x] Tested live on a real blog (feature or fix) - [x] Updated CLI `--help` and README if needed - [x] Updated `docs/` if the download flow or dev process changed - [x] Added a line to `## Unreleased` in CHANGELOG.md (or the `ci/skip-changelog` label if not user-facing) --- <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:59 +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#217
No description provided.