Skip to content

Request both formats at once + Open Library 403 and LazyLibrarian fixes#2

Merged
Garrett3Nelson merged 10 commits into
mainfrom
feature/request-both-and-upstream-fixes
Jul 3, 2026
Merged

Request both formats at once + Open Library 403 and LazyLibrarian fixes#2
Garrett3Nelson merged 10 commits into
mainfrom
feature/request-both-and-upstream-fixes

Conversation

@Garrett3Nelson

Copy link
Copy Markdown
Owner

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-requests User-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:

  • Drops "Book Summary of …" / study-guide junk editions and ranks by title+author overlap, so the real book wins (e.g. "The Martian" no longer resolves to a summary edition).
  • Fails loudly (ValueError) when only a non-LazyLibrarian id (an Open Library OL…W) is available, instead of silently adding nothing and leaving the request stuck on "processing".
  • Falls back to name search when the ISBN searchItem lookup 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/request now accepts a targets array and creates one independent request entry per format, so a failure in one format doesn't block the other.

Also

Testing

python -m pytest -q36 passing (9 new tests across tests/test_lazylibrarian_resolution.py and tests/test_request_targets.py). Frontend node --check clean. Note: the modal's on-screen behavior was not visually verified in this branch.

🤖 Generated with Claude Code

Garrett3Nelson and others added 10 commits June 29, 2026 06:14
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
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
@Garrett3Nelson
Garrett3Nelson merged commit 06929fe into main Jul 3, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant