Skip to content

redo search normalization and cleanup request generation - #4

Open
AllergicSquare wants to merge 4 commits into
BitlessByte0:mainfrom
AllergicSquare:redo-search-normalization
Open

redo search normalization and cleanup request generation#4
AllergicSquare wants to merge 4 commits into
BitlessByte0:mainfrom
AllergicSquare:redo-search-normalization

Conversation

@AllergicSquare

Copy link
Copy Markdown

  • I have read the contributing guidelines and understand that I have made the correct modifications

Description:

  • switched from SanitizedSearchTerm to raw SearchTerm
  • moved normalization into the ABB provider
  • reworked normalization logic (keep useful characters, strip unsupported/unknown characters)
  • removed references to unused 'capability' check

Benefits of this PR and context:

this should (hopefully!) allow more successful search queries!

How Has This Been Tested?

tested with multiple queries that were unsupported before (e.g. search queries with apostrophes). possibly still strips useful characters that the abb search supports, but it should be easy to change the logic. (feel free to let me know!)

Source / References:

n/a

- switched from SanitizedSearchTerm to raw SearchTerm
- moved normalization into the ABB provider 
- reworked normalization logic (keep useful characters, strip unsupported/unknown characters)
- removed references to unused 'capability' check

this should (hopefully!) allow more successful search queries!
tested with multiple queries that were unsupported before (e.g. search queries with apostrophes).
possibly still strips useful characters that the abb search suports, but should be easy to change the logic. (feel free to let me know!)
…ightly

audiobookbay requires a session cookie sometimes for some reason.
search results also seem more limited in these cases.
might be rate limiting?
@AllergicSquare

Copy link
Copy Markdown
Author

i pushed another commit that makes the search url scheme the same as when doing searches on the site manually.

i also added the session cookie parameter to the search requests, since the search sometimes returned no results without them.

i took at the cookie handling of other prowlarr indexers for this. maybe it can be handled better. the only issue i can think of is that a valid search can take a bit longer, if you searched something with no results before because it makes it fetch the session cookie again. also the first ever search takes a bit longer i guess.

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