Skip to content

Local books can find a cover from audiobookcovers.com and Open Library, or use a photo - #109

Merged
StaticHumStudio merged 15 commits into
masterfrom
feat/220k-cover-search
Nov 1, 2026
Merged

StaticHumStudio merged 15 commits into
masterfrom
feat/220k-cover-search

Conversation

@StaticHumStudio

Copy link
Copy Markdown
Owner

What changes for users

  • Find a cover for local books. A local book's page (archived ones too) gets a Find a cover button. It opens a search with the book's title and author filled in, editable, and nothing is sent anywhere until the listener taps Search. A line under the button says the title and author go to audiobookcovers.com and Open Library.
  • Two sources, real matches first. audiobookcovers.com (square community cover art from r/audiobookcovers) shows its title matches first, then Open Library. Junk look-alike results are never shown. When neither source has the book, the screen says so, and when neither can be reached it says that instead and points at the photo picker.
  • Pick from my photos. The system photo picker, no storage permission. Any image becomes a cover.
  • Square without cropping. A portrait cover is fitted whole onto a square over a soft fill made from its own art.
  • The pick sticks. It survives folder rescans, a moved folder (the moved book gets its own copy) and an archived book, comes along on a phone to phone transfer, and "Use the original cover" undoes it. The book that is playing updates its cover at once in the mini player, the full player, the notification and Android Auto, with no restart.
  • Free for everyone. No unlock needed.

How it talks to the sources

  • audiobookcovers.com: one request per Search to the site's own title search page (/search?title=&author=), whose embedded data is parsed. The site's JSON API only matches by image, so its results cannot be filtered by title. If the page format changes, that source drops out quietly with one log line and Open Library and photos keep working. A live canary test (skipped in CI, run by hand, passing) catches a format change.
  • Open Library: the covers API with a User-Agent naming the app and a contact address, as its docs ask.
  • A separate HTTP client with none of the app's server sign-in pieces. Redirects are followed by hand, up to 3 hops, https only, to the known hosts. Every download has a size cap and a timeout, and bad images fail soft.

Tests

  • JVM: 1,889 pass (master has 1,783). CI parity green.
  • Instrumented on an API 36 emulator: 32 suites' tests at the final head, 31 passed first time. LocalBookMove's Dossier total check read 0s once and passed 4 of 4 on rerun. That test predates this branch and reads nothing it changed.

Evidence

/home/static/nine-lives-evidence/2026-10-31-220k/SUMMARY.md and k/shots/: Project Hail Mary shows its real audiobookcovers.com cover first then Open Library tiles, Carmilla shows "No covers found" until edited, a photo pick, a pick surviving a rescan and the new cleanup, undo, and the playing book's notification art updating.

Review

  • Claude Opus review 1: privacy holds (nothing before Search, no credentials reach these hosts, parsed pages cannot pick an arbitrary host). Fixed: redirects were unchecked after the first hop, phone transfer dropped pick files, orphaned pick files never got cleaned, and failed thumbnails showed "No covers found".
  • Claude Opus review 2: clean.
  • Earlier during the build: audiobookcovers.com's image search ranked unrelated covers first, so the owner chose the site's title search page instead.

For Jeff

  • Data Safety and privacy policy drafts: /home/static/nine-lives-evidence/2026-10-31-220k/drafts/. audiobookcovers.com's own code sends searched titles to its analytics, and the site has no privacy policy. Our line under the button already discloses the title and author going there.
  • Open Library asks apps to fill in its free "Registering Your Application" form (no key).

Draft copy pending Jeff

Find a cover. Searching sends this book's title and author to audiobookcovers.com and Open Library. Title and author. Search. Pick from my photos. Searching for covers... No covers found. Try a shorter title. Couldn't reach the cover services. Check your connection, or pick from your photos. audiobookcovers.com. Open Library. Cover art by r/audiobookcovers. Use this cover. Cancel. That cover didn't save. Try another one. Use the original cover.

🤖 Generated with Claude Code

https://claude.ai/code/session_014XfNSbEfq8dG2ResrdGXbf

StaticHumStudio and others added 15 commits October 31, 2026 22:14
…ks, and Use the original cover puts the folder's art back

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014XfNSbEfq8dG2ResrdGXbf
…he server sign in

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014XfNSbEfq8dG2ResrdGXbf
…t, never cropped

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014XfNSbEfq8dG2ResrdGXbf
…d Auto right away

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014XfNSbEfq8dG2ResrdGXbf
…eview, and set

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014XfNSbEfq8dG2ResrdGXbf
… original cover

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014XfNSbEfq8dG2ResrdGXbf
…search box

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014XfNSbEfq8dG2ResrdGXbf
…y on the page

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014XfNSbEfq8dG2ResrdGXbf
…om, whose square art comes first

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014XfNSbEfq8dG2ResrdGXbf
…ibrary

audiobookcovers.com's json search is a picture similarity search that always
answers with 20 covers, however unrelated, so unrelated books sat above the real
Open Library covers. The app now reads the site's book search page instead, which
matches the title and author against the book each cover belongs to and answers
nothing when no cover matches. The untouched search box sends the book's own title
and author tags. An edited box is sent as the title alone.

The grid shows audiobookcovers.com matches first, then Open Library, and says
No covers found when both come back empty. If the site changes that page and the
app cannot read it, that source drops out with one warning and Open Library and
photos keep working. Tests run against saved copies of the real pages, plus a
live canary that CI skips.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014XfNSbEfq8dG2ResrdGXbf
audiobookcovers.com ties each cover to an Open Library book with a confidence.
For Project Hail Mary it also groups The Martian covers under an omnibus book,
as likely or uncertain matches. Covers the site confirmed now come first, then
likely ones, then the rest, so the real art leads the grid.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014XfNSbEfq8dG2ResrdGXbf
…nd tidies stray files

Cover requests no longer follow redirects on their own. Each hop is checked by hand,
up to three, and must stay on https and on the cover services' hosts (Open Library,
the Internet Archive hosts its covers move to, audiobookcovers.com and its image
host). Anything else drops that tile quietly.

A phone to phone transfer now brings the picked covers along with the rows that
point at them. If a pick's file is missing anyway, the next scan treats it as no
pick, so the folder's art shows instead of a blank.

After each local scan, files in the picked covers folder that no book points at and
that are over an hour old are deleted, leftover temp files included.

When covers came back but every thumbnail failed to load, the screen now says it
couldn't reach the cover services instead of "No covers found".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014XfNSbEfq8dG2ResrdGXbf
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-01T04:00:02.829305Z 10ba9ed PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@StaticHumStudio
StaticHumStudio merged commit 08ecdc3 into master Nov 1, 2026
1 check 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