Skip to content

fix: URL encode Overseerr search queries#2

Open
ericboehs wants to merge 1 commit into
shaktech786:mainfrom
ericboehs:fix/overseerr-search-url-encoding
Open

fix: URL encode Overseerr search queries#2
ericboehs wants to merge 1 commit into
shaktech786:mainfrom
ericboehs:fix/overseerr-search-url-encoding

Conversation

@ericboehs
Copy link
Copy Markdown

Summary

  • Fixes Overseerr search failing with HTTP 400 when query contains spaces or special characters
  • Adds explicit URL encoding using urllib.parse.quote() before passing the query to httpx

Problem

Searches like "The Santa Clause" or "Miracle on 34th Street" fail with:

HTTP 400 - {"message":"Parameter 'query' must be url encoded. Its value may not contain reserved characters."}

Solution

Pre-encode the query parameter in search_media() before it's passed to the HTTP client.

Test plan

  • Tested search with spaces: "The Santa Clause" ✅
  • Tested search with special characters
  • Single-word searches still work

Overseerr's API rejects search queries containing spaces or special
characters with HTTP 400 unless they are pre-encoded. This adds
explicit URL encoding using urllib.parse.quote() before passing the
query parameter to httpx.

Fixes searches like "The Santa Clause" or "Miracle on 34th Street"
that previously failed with "Parameter 'query' must be url encoded".
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