Skip to content

Search tags and languages regardless of case - #1590

Merged
frenck merged 1 commit into
mainfrom
frenck/lowercase-tag-language-filters
Oct 2, 2026
Merged

frenck merged 1 commit into
mainfrom
frenck/lowercase-tag-language-filters

Conversation

@frenck

@frenck frenck commented Oct 2, 2026

Copy link
Copy Markdown
Owner

Breaking change

None. Searches for a tag or language with uppercase letters used to find nothing, and now find what they should.

Proposed change

Found while comparing with other Radio Browser clients: pyradios had to fix the same thing (andreztz/pyradios#31). The API stores tags and languages in lowercase and matches them case sensitive. Checked against the live API:

stations/search?tag=Jazz&tagExact=true            -> 0 stations
stations/search?tag=jazz&tagExact=true            -> 3 stations
stations/bylanguageexact/Dutch                    -> 0 stations
stations/search?tagList=Jazz,Blues                -> 0 stations

This bites in combination with the library itself: languages() returns title-cased names like "Dutch", so passing a Language.name back into search(language=...) or stations(filter_by=FilterBy.LANGUAGE_EXACT, ...) found nothing.

Tag and language values are now lowercased before they are sent: tag, tag_list and language in search(), and the term of the tag and language FilterBy values in stations() and search(). Other filters, like name, state and codec, are already case insensitive in the API and are sent as given.

The docstrings and README also explain what "exact" means for tags and languages, which tripped up a radiobrowser4j user (sfuhrm/radiobrowser4j#125): an exact match is about the tag or language itself, so a station with other tags or languages next to it still matches.

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.

The API stores tags and languages in lowercase and matches them case
sensitive, so "Jazz" or "Dutch" found nothing, including the language
names languages() itself returns. Lowercase those filter values.
@frenck frenck added the bugfix Inconsistencies or issues which will cause a problem for users or implementers. label Oct 2, 2026
@frenck
frenck merged commit b9c2982 into main Oct 2, 2026
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Inconsistencies or issues which will cause a problem for users or implementers.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant