feat(search): search by narrator - #886
Open
krejko wants to merge 1 commit into
Open
Conversation
Adds a Narrator field to advanced search, routed to Audible's own narrator parameter rather than through the keyword composer. The provider layer already accepted a narrator argument and threaded it to parameters["narrator"]; every call site passed null. The missing pieces were a field on SearchRequest, a dispatch branch, and a UI input. Deliberately not done by adding NARRATOR: to ComposeAdvancedQuery. That composes a string handed to the keyword search, where the prefix becomes a literal token and matches nothing. TryExecuteNarratorSearchAsync mirrors the existing series branch instead, calling the narrator endpoint directly and falling back to unified search when it returns nothing. A request carrying both author and narrator stays on the author path: author is the more selective field and narrowing to the narrator endpoint would discard it. Also fixes resetAdvancedSearch, which rebuilt the params object field by field and would otherwise have left a stale narrator behind. Verified against a live instance: narrator "Stephen Fry" returns Sherlock Holmes, Mythos, Odyssey and Harry Potter - his catalogue rather than titles mentioning his name - and "Jim Dale" returns his Harry Potter recordings.
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.
Adds a Narrator field to advanced search, routed to Audible's own narrator parameter.
The provider layer already accepted a narrator argument and threaded it to
parameters["narrator"]— every call site passednull. The missing pieces were a field onSearchRequest, a dispatch branch, and a UI input.Deliberately not done by adding
NARRATOR:toComposeAdvancedQuery. That composes a string handed to the keyword search, where the prefix becomes a literal token and matches nothing.TryExecuteNarratorSearchAsyncmirrors the existing series branch instead, calling the narrator endpoint directly and falling back to unified search when it returns nothing.A request carrying both author and narrator stays on the author path — author is more selective, and narrowing to the narrator endpoint would discard it. Both behaviours have tests.
Also fixes
resetAdvancedSearch, which rebuilds the params object field by field and would otherwise leave a stale narrator behind.Verified against a live instance:
Stephen Fry→ Sherlock Holmes, Mythos, Odyssey, Harry Potter — his catalogue, not titles mentioning his nameJim Dale→ his Harry Potter recordings