Summary output now lists each failed book (ISBN + title + reason)
and each skipped book (ISBN + title) in both plain-text and rich/TTY
formats. Ctrl+C produces a clean shutdown message with exit code 130
instead of a Python traceback. Three integration tests exercise the
full run() pipeline: happy path, mixed results, and fatal auth failure.
12 new tests (168 total), 15/15 acceptance criteria met.
Rich progress bars with live %/ETA/speed/file size for interactive
terminals; plain log lines for pipes/cron. Reads Content-Length from
HTTP response so percentage works from first chunk onward. Per-book
failure isolation prevents one bad book from stopping the batch.
18 new tests, 156 total passing.
Add accompanying file download pipeline: PDF extras via new
client.fetch_pdf_extra_url() endpoint, cover art from existing
book.cover_url, both using streaming .partial -> atomic rename pattern.
Config toggles (download_extras, download_covers) control which files
are downloaded. Failures log warnings only -- never mark a book as
failed. Wired into all 3 format strategy paths in download_book().
Output structure: books with extras create subdirectories containing
audio + PDFs + cover; books without extras output audio as leaf file.
12 new tests (134 total), 11/11 acceptance criteria met.
- 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
Add streaming chunked M4B download via .partial files and atomic
rename, resume support through HTTP Range headers, full CLI
orchestration loop, --verbose flag, and config/secrets templates.
Fix 4 API-shape bugs found during live testing: library endpoint
returns audiobooks not books, M4B endpoint returns m4b_url not url,
narrators nested under audiobook_info, and ISBN int/str type mismatch
in history lookup causing re-downloads.
12 new tests (109 total). 6 books downloaded live (~2.9 GB).
Add pure-logic downloader module with Book dataclass, filesystem-safe
path component sanitization, default conditional path patterns, custom
{TOKEN} pattern substitution, and subdirectory decision logic.
- sanitize(): 5-rule pipeline — colon→dash, strip illegal/control chars,
trim whitespace, remove trailing dots, cap at 255 characters
- resolve_path(book, pattern?): default mode selects pattern by series
presence; custom mode substitutes 11 tokens with sanitization
- needs_subdirectory(book): True when PDF extras or cover art present
- @dataclass(frozen=True) Book: immutable record for all book metadata
56 new tests across 11 classes. 97 total tests passing. 16/16 AC met.
Add the data layer that feeds into downloads: OAuth2 password grant
authentication via httpx, paginated library fetching across all pages,
download history JSON read/write with corrupt-recovery safety, and a
CLI skeleton that wires config → auth → fetch → filter → print.
16 new tests (6 client + 7 history + 3 CLI), 41 total passing.
All 11 acceptance criteria met.
Set up Python package with pyproject.toml, venv, and runtime/test
dependencies. Implement config module that loads config.yaml +
secrets.yaml with deep-merge override, validates required fields,
rejects credentials in config.yaml, applies defaults, and returns a
frozen Config dataclass. 25 tests across 7 test classes.