Skip to content

fix(api): preserve media type for scoped book lookup - #114

Open
snapetech wants to merge 1531 commits into
Chaptarr:developfrom
snapetech-org:main
Open

snapetech wants to merge 1531 commits into
Chaptarr:developfrom
snapetech-org:main

Conversation

@snapetech

Copy link
Copy Markdown

Fixes #67

Book lookup already accepts a mediaType query parameter and filters remote results with it, but the remote text-search path was not given that value. Goodreads autocomplete results therefore kept the default Audiobook media type, so an ebook lookup filtered every result out.

This passes the requested BookMediaType from BookLookupController through ISearchForNewBook and BookInfoProxy. Calls without a scope keep the existing behavior.

I added regression coverage for both the controller forwarding the requested type and Goodreads text results retaining it.

Testing:

  • dotnet build src/Chaptarr.sln --configuration Release --no-restore
  • dotnet test src/Chaptarr.Core.Test/Chaptarr.Core.Test.csproj --configuration Release --no-restore
  • 2,854 tests passed

snapetech and others added 26 commits October 24, 2026 11:45
Pin both source trees, distinguish compatibility defects from review and qualification work, and prioritize unchanged-client semantics and recoverable installed migration. Add a reproducible review snapshot without changing historical dispositions or release gates.

Validation: isolated audit assertions, deterministic snapshot regeneration, document links/counts, Semgrep (zero findings), image-alias/readiness regressions, and diff whitespace checks.

release-note: none
snapetech and others added 30 commits October 31, 2026 14:32
A book pinned to one narration (a narrator-specific request, or a second
narration tracked as a variant) gives its pinned edition first crack at a
download, but only when a tag names the wanted narrator. Many uploads have
no narrator credit at all, so the download fell through to library-wide
matching, which cannot tell the base book and its variant apart, and the
import was blocked (NO_MATCH_HOLY_GRAIL).

When no tag names any narrator, accept the pinned edition if the file
length is within the usual audiobook matching tolerance of that edition
and every other known narration of the book is at least two minutes
farther from the file. Narrations can be only minutes apart (two Harry
Potter readings differ by seven), so the tolerance alone cannot tell them
apart. A tag naming another narrator, an unknown length, or a length that
does not single out the pinned narration still fails as before. The title
check also accepts the pinned title without an Audible-style ", Book N"
suffix, which uploads rarely repeat.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Book lookup returns only audiobook editions, so the /ebook facade scope is always empty

3 participants