Request both formats at once + Open Library 403 and LazyLibrarian fixes#2
Merged
Merged
Conversation
Set an identifying User-Agent on outbound requests so Open Library / Internet Archive stops returning 403 for the python-requests default UA (upstream issues zamnzim#9, zamnzim#10). Port upstream PR zamnzim#11: drop summary/study-guide editions when resolving a LazyLibrarian request, rank by title+author overlap, fail loudly on non-LazyLibrarian (OL...W) ids instead of silently adding the wrong book, and fall back to name search when ISBN searchItem returns HTTP 500. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019QAAfNHLFzwaD5CXerQU8g
Bindery is not a Readarr API clone — it splits lookup into separate /search/book?q= and /book/lookup?isbn= endpoints, so the Readarr client's term-based lookups 400. Park as a dedicated-backend feature rather than a Readarr patch. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019QAAfNHLFzwaD5CXerQU8g
) Multi-select format toggles with per-slot quality profile + root folder; unconfigured slots disabled with a hover tooltip. Backend creates two independent request entries from one submit via a shared helper, so refresh and delete stay per-entry and partial failure is isolated. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019QAAfNHLFzwaD5CXerQU8g
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019QAAfNHLFzwaD5CXerQU8g
The OpenLibrary UA override was placed between imports, triggering E402 (module level import not at top of file) on every following import and failing CI lint. Moved it below the import block; it still runs at import time before any HTTP request. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019QAAfNHLFzwaD5CXerQU8g
- Usage and Features now describe selecting ebook, audiobook, or both (each format with its own profile/folder; one request per format). - Document optional Hardcover metadata source (Open Library is the default). - Add a Testing and Linting section (requirements-dev.txt, ruff, pytest, CI). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019QAAfNHLFzwaD5CXerQU8g
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses several open upstream issues plus a new feature, all on top of the merged hardcover work.
Fixes
Open Library 403 (issues zamnzim#9, zamnzim#10) — Open Library / Internet Archive blocks the default
python-requestsUser-Agent, returning 403 on every search/discover call for a fresh install. Now sends an identifying UA so the Open Library path works again.LazyLibrarian request resolution (ports upstream PR zamnzim#11) — Hardens how a request is resolved against a LazyLibrarian backend:
ValueError) when only a non-LazyLibrarian id (an Open LibraryOL…W) is available, instead of silently adding nothing and leaving the request stuck on "processing".searchItemlookup returns HTTP 500.Feature
Request both ebook + audiobook at once (issue zamnzim#8) — The download modal's format buttons are now multi-select toggles; you can request one format or both in a single action. Each format keeps its own quality profile and root folder, unconfigured slots are disabled with a hover tooltip, and the Download button is gated until each selected format has a profile + folder. The backend
/api/requestnow accepts atargetsarray and creates one independent request entry per format, so a failure in one format doesn't block the other.Also
TODO.mdentry — it is not a Readarr API clone (it splits lookup into separate/search/book?q=and/book/lookup?isbn=endpoints), so it needs a dedicated backend adapter rather than a Readarr patch.docs/superpowers/.Testing
python -m pytest -q→ 36 passing (9 new tests acrosstests/test_lazylibrarian_resolution.pyandtests/test_request_targets.py). Frontendnode --checkclean. Note: the modal's on-screen behavior was not visually verified in this branch.🤖 Generated with Claude Code