Skip to content

fix(search): use raw HTTP request in multi to avoid broken union-type unmarshal#75

Merged
electather merged 1 commit intomainfrom
fix/search-multi-raw-get
Mar 16, 2026
Merged

fix(search): use raw HTTP request in multi to avoid broken union-type unmarshal#75
electather merged 1 commit intomainfrom
fix/search-multi-raw-get

Conversation

@electather
Copy link
Owner

Summary

  • Replaces SearchAPI.SearchGet() with apiutil.RawGet in cmd/search/multi to bypass the generated client's broken union-type unmarshal that incorrectly parses TV results as PersonResult
  • Mixed movie/TV/person results are now preserved correctly, consistent with the MCP search_multi tool
  • Spaces in search queries are encoded as %20 (not +), matching Seerr's strict URL-encoding requirement

Test plan

  • TestSearchMultiMixedResults — verifies movie, TV, and person results are all present in output
  • TestSearchMultiQueryEncoding — verifies spaces are encoded as %20, not +
  • Existing TestSearchCommands/multi_search — continues to pass

Issue

Closes #65

…ion-type unmarshal

The generated SearchAPI.SearchGet client incorrectly parses TV results as
PersonResult due to a union-type unmarshal bug. Switch to apiutil.RawGet
so mixed movie/TV/person results are preserved correctly and spaces in
queries are encoded as %20, consistent with the MCP implementation.
@electather electather merged commit 39b0436 into main Mar 16, 2026
2 checks passed
@electather electather deleted the fix/search-multi-raw-get branch March 16, 2026 12:27
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.

bug: search multi CLI still uses broken generated /search client path

1 participant