Skip to content

Add country code, state, language and tag filters to search - #1549

Closed
balloobbot wants to merge 1 commit into
frenck:mainfrom
balloobbot:search-filters
Closed

balloobbot wants to merge 1 commit into
frenck:mainfrom
balloobbot:search-filters

Conversation

@balloobbot

Copy link
Copy Markdown

Proposed Changes

Add country code, state, language and tag filters to station search. Each filter is sent only when set. Home Assistant's Radio Browser media source needs them to search inside a country, language or tag folder. Unset filters are now left out of the query, so a search without a name no longer fails:

TypeError: Invalid variable type: value should be str, int or float, got None of type <class 'NoneType'>

Related Issues

None.

🤖 Generated with Claude Code

https://claude.ai/code/session_01UMsxKXDQSTDRiu1mucsyuh

The Radio Browser API supports the countrycode, state, language and
tag query parameters on the station search endpoint. search() now
accepts country_code, state, language and tag. It sends each one
only when it is set.

search() now drops query parameters whose value is None. yarl rejects
None as a query value, so a search without a name raised a TypeError.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@frenck

frenck commented Sep 30, 2026

Copy link
Copy Markdown
Owner

Thanks! The extra filters and leaving out unset values were spot on. This conflicted with #1550 and with the tooling update on main, so I combined both into #1552. That also fixes the exact-match flags, which were still sent in snake_case here and ignored by the API.

../Frenck

                       

Blogging my personal ramblings at frenck.dev

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.

3 participants