Commit Graph
6 Commits
Author SHA1 Message Date
AlexKucera 7a0d8c1d18 feat(config): add workers field and --workers CLI flag
Add parallel download worker-count configuration through all three
config layers: Config dataclass (workers=3 default), YAML parsing
with InvalidWorkersError validation, and -w/--workers CLI flag with
three-layer resolution (CLI > config > hardcoded 3). 6 new tests.

Closes #12
2026-06-03 17:07:50 +02:00
AlexKucera 4aaae68a2e feat(cli): enhanced summary, graceful Ctrl+C, integration tests (closes #9)
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.
2026-06-03 15:00:27 +02:00
AlexKucera 6cefc79006 feat(progress): add TTY-aware download reporting (closes #8)
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.
2026-06-03 14:44:37 +02:00
AlexKucera 455d3dd172 feat(downloader): add MP3 fallback pipeline with ZIP download and format strategies (closes #6)
- 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
2026-06-03 13:22:45 +02:00
AlexKucera 33aa80b7aa feat(downloader): add M4B download pipeline with resume (closes #5)
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).
2026-06-03 12:56:41 +02:00
AlexKucera 515f5c01f6 feat(client,history,cli): add auth, library fetch, and download history (closes #3)
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.
2026-06-03 11:44:16 +02:00