feat(downloader): add PDF extras and cover art download (closes #7)

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.
This commit is contained in:
AlexKucera committed 2026-06-03 14:00:55 +02:00
1 parent 2a0b43aca9
commit aceaece504
8 files changed
+639 -3

No files matched your search

+8
View File
@@ -22,6 +22,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- 12 new tests covering M4B query, streaming download, resume, path
integration, subdirectory logic, history post-download, skip behavior,
and verbose output (109 total)
- PDF extras and cover art download: `fetch_pdf_extra_url()` client
endpoint, `download_accompanying_files()` with config toggles
(`download_extras`, `download_covers`), streaming .partial → atomic
rename pattern, non-critical failure handling (warnings only), and
output structure verification (subdirectory vs flat layout)
- 12 new tests covering PDF URL fetch, cover/PDF download, .partial
cleanup, config toggle behavior, failure handling, and directory layout
(134 total)
### Fixed
- Library endpoint key mismatch: API returns "audiobooks" not "books"