Skip to content

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

Open
snapetech wants to merge 1 commit into
Chaptarr:developfrom
snapetech:main
Open

fix(api): preserve media type for scoped book lookup#114
snapetech wants to merge 1 commit into
Chaptarr:developfrom
snapetech: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
Pass the requested media type through the remote lookup path so scoped clients receive results of the type they requested before lookup filtering is applied.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant