feat(path): add OutputPlan dataclass for centralized path resolution
Introduce frozen OutputPlan dataclass carrying all resolved file paths (audio, partial, cover, PDF) for a single Book. Add resolve_output_plan() function that centralizes every path computation so download functions receive pre-resolved Paths instead of computing them inline. Refactor download_book() to consume plan.audio_path (eliminating duplicated sanitize(title).m4b logic), download_accompanying_files() to accept an OutputPlan instead of raw output_dir, and _download_cover/_download_pdf to accept optional expected_path parameter. Closes #28
This commit is contained in:
1 parent
fe7642be7c
commit
0ee8186361
7 files changed
+467
-35
No files matched your search
@@ -15,6 +15,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
a deprecated re-export shim. Endpoint signatures slimmed from 4-5 params
|
||||
to ≤3 (transport removed). 227 tests pass (+17 new). Closes #27.
|
||||
|
||||
- **path:** Introduce OutputPlan frozen dataclass and resolve_output_plan()
|
||||
function to centralize all path computation for a book. Download functions
|
||||
now consume pre-resolved plan fields instead of computing paths inline,
|
||||
eliminating duplicated audio-filename logic. 237 tests pass (+10 new).
|
||||
Closes #28.
|
||||
|
||||
10:9bb|### Fixed
|
||||
- **progress:** Wire task_id through parallel progress callback.
|
||||
|
||||
Reference in new issue
Block a user