Skip to content

Add the remaining search filters - #1560

Merged
frenck merged 1 commit into
mainfrom
frenck/search-more-filters
Oct 1, 2026
Merged

frenck merged 1 commit into
mainfrom
frenck/search-more-filters

Conversation

@frenck

@frenck frenck commented Oct 1, 2026

Copy link
Copy Markdown
Owner

Breaking change

None. All new parameters are optional and default to not filtering.

Proposed change

search() was missing several of the parameters the Radio Browser API documents for stations/search. This adds them:

  • tag_list: only stations that match all of these tags.
  • codec: for example MP3 or AAC.
  • is_https, has_geo_info, has_extended_info: True or False to filter, None (the default) for both.
  • geo_lat, geo_long, geo_distance: stations within a distance (in meters) of a location.

A geo search with only one of geo_lat and geo_long, or a geo_distance without a location, raises a ValueError instead of being silently ignored by the API.

One thing the API docs do not mention: like tag, tagList matches part of a tag, so blues also finds blues rock. That is now in the docstring.

Checked against the live API: a search within 5 km of Amsterdam returns 47 stations, all close by; tag_list=["jazz", "blues"] narrows 500+ jazz stations down to 150; codec="AAC", is_https=True returns only AAC streams over HTTPS.

Type of change

  • Dependency or tooling upgrade
  • Bugfix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Deprecation (replaces or removes a feature, with a migration path)
  • Breaking change (a fix or feature that changes existing behavior)
  • Code quality, refactor, or test-only change
  • Documentation only

Additional information

  • This PR fixes or closes issue: fixes # None
  • This PR is related to: None
  • Link to a separate documentation pull request: None

Checklist

  • I fully understand the code in this pull request and can explain every line, including any AI-assisted changes.
  • The change is covered by tests, and poetry run pytest passes locally. A pull request cannot be merged unless CI is green.
  • poetry run prek run --all-files passes (lint, format, and type checks).
  • No commented-out or dead code is left in the pull request.

Add the tag list, codec, HTTPS, geo info, extended info and geo search
parameters the API documents for stations/search. An incomplete location
for a geo search raises a ValueError.
@frenck frenck added the new-feature New features or options. label Oct 1, 2026
@frenck
frenck merged commit 7f56620 into main Oct 1, 2026
31 checks passed
@frenck
frenck deleted the frenck/search-more-filters branch October 1, 2026 09:56
@frenck frenck mentioned this pull request Oct 1, 2026
4 of 11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-feature New features or options.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant