- Add fetch_download_manifest() to client for MP3 manifest endpoint - Add download_zip_part() for streaming ZIP download, .partial tracking, resume via Range header, auto-extraction and cleanup - Refactor download_book() with format_strategy param: m4b_mp3_fallback, mp3_only, m4b_only - Add --limit N CLI flag to cap downloads for testing - Wire config.format through CLI to download_book() - 12 new tests (122 total), all passing
2.2 KiB
2.2 KiB
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[Unreleased]
Added
- MP3 format fallback: download manifest fetch, ZIP part download+extraction
with .partial tracking and resume, format strategy selector (m4b_mp3_fallback,
mp3_only, m4b_only), and
--limitCLI flag for capped downloads - M4B download pipeline: streaming chunked download with .partial files, atomic rename to .m4b, resume support via HTTP Range header
fetch_m4b_url()client method for M4B download URL lookupdownload_book()orchestration: resolve path → query M4B → download → write history; returns None when book has no M4B available- Full CLI download loop with per-book status, summary counts, and --verbose flag showing config/auth/library/download details
config.yamltemplate andsecrets.yamlgitignored credentials file- 12 new tests covering M4B query, streaming download, resume, path integration, subdirectory logic, history post-download, skip behavior, and verbose output (109 total)
Fixed
- Library endpoint key mismatch: API returns "audiobooks" not "books"
- M4B endpoint key mismatch: API returns "m4b_url" not "url"
- Narrators nested under
audiobook_info.narratorsin API response - ISBN type mismatch in history lookup: JSON keys are strings but API returns ISBN as integer — added str() coercion in find/is_downloaded
- Missing download loop in CLI run() function (listed books but never downloaded)
Changed
- Initial project scaffolding: pyproject.toml, package structure, test suite
- Config module with YAML loading, secrets deep-merge, validation, and defaults
- OAuth2 client with password grant auth and paginated library fetch
- Download history tracking with corrupt JSON recovery
- Path resolution with default conditional patterns and custom token substitution
- Filesystem-safe component sanitization (illegal chars, control chars, colons)
- Immutable Book dataclass for typed book metadata
- Subdirectory decision logic based on PDF extras or cover art presence