Skip to content

Releases

v2.0.1

Choose a tag to compare

@github-actions github-actions released this 04 Oct 09:24
8073f1f

What's changed

2.0.0 declared its license as MIT AND Unicode-3.0, because of the country names from the Unicode CLDR it ships. License audits that only allow a list of licenses, like the one of Home Assistant, do not know Unicode-3.0 and refuse the package. This release declares it as MIT again. Nothing else changes: the country names still come with the copyright and permission notice of the Unicode License V3, in country_names.py.

🐛 Bug fixes

v2.0.0

Choose a tag to compare

@github-actions github-actions released this 04 Oct 09:00
caf18e8

What's changed

python-radios no longer depends on pycountry. It used it for one thing, turning a country code into a name, and pycountry reads its database from disk the first time you look a country up, which in an asyncio application happens inside the event loop. The country names now ship with the library, so looking one up never does I/O.

Upgrading

  • Country names changed. Country.name, Station.country and the names countries() returns are now the common English names from the Unicode CLDR, the data browsers and operating systems use, instead of the formal ISO names from pycountry. 47 countries get another name, for example "South Korea" instead of "Korea, Republic of", "Iran" instead of "Iran, Islamic Republic of", "Taiwan" instead of "Taiwan, Province of China", "Russia" instead of "Russian Federation", and "Bosnia & Herzegovina" instead of "Bosnia and Herzegovina". If your code compares country names, compare country codes instead. (#1634)
  • pycountry is no longer a dependency. If you used it through radios, add it to your own dependencies. (#1634)
  • License. The country names are data from the Unicode CLDR, under the Unicode License V3, so the package is now licensed MIT AND Unicode-3.0. (#1634)

🚨 Breaking changes

  • Replace pycountry with country names from the Unicode CLDR @frenck (#1634)

🚀 Enhancements

  • Replace pycountry with country names from the Unicode CLDR @frenck (#1634)

v1.0.0

Choose a tag to compare

@github-actions github-actions released this 02 Oct 12:31
dee73c1

python-radios 1.0.0 is a thorough overhaul. Station search now actually applies its filters, the client covers the whole Radio Browser API, it handles failing servers and broken responses without leaking raw exceptions, it fixes station data that Radio Browser itself no longer gets fixed, and the library finally has a real test suite (100% coverage, run against every supported Python version). Home Assistant users get all of this through the Radio Browser integration.

New

  • The rest of the API. Codecs and states (codecs(), states(country_code=...)), several stations at once (stations_by_uuid()) or by stream URL (stations_by_url()), voting (vote()), and the check and click history of stations (checks(), clicks()). (#1580, #1583, #1584, #1585, #1586)
  • Every search filter the API knows, including geo search. Results of a geo search carry their distance in meters. (#1552, #1560, #1578)
  • Filter countries, languages and tags by name, regardless of case. (#1581, #1590)
  • Station corrections. Radio Browser has no way to edit a station, and its corrections repository has not merged a fix since May 2025. So the library ships its own: JSON files per country, matched to stations by UUID, that fix stream URLs that moved, broken logos, names and regions, or delete a duplicate. They are applied to every station the client returns, and station_click() returns the corrected stream URL. The first 564 corrections, across 60 countries, come from the open radio-database merge requests and the Radio Browser issue tracker, each checked against the live API. They also delete 23 fake stations that play a national anthem or a chat sound instead of the station in their name, and 60 stations that have not played for months. Pass corrections=False to get the stations exactly as the API returns them, and see CONTRIBUTING.md to add one. (#1604, #1605 to #1632)
  • One station per stream. Many streams are listed more than once, by people who could not edit the existing station: 13,173 extra records in the catalog. stations() and search() now return one station per stream, the one with the most votes. Looking a station up by UUID still finds every copy, so saved stations keep working. Pass deduplicate=False to get them all. (#1633)
  • A more resilient client. It tries the next API server when one fails, falls back to all.api.radio-browser.info when the server lookup fails or never answers, and can be shared by concurrent tasks. Turn on debug logging for radios to see which server it uses and why it retries. (#1591, #1594, #1598, #1599)

Upgrading

Most code keeps working as is. Things to check:

  • Python 3.12 or newer is required. (#1551)
  • Dependencies. aiodns 4.0 or newer is required, and pycares 5.0 or newer and probatio 0.13.0 or newer are now direct dependencies. backoff and cachetools are no longer dependencies. (#1554, #1556, #1557, #1602)
  • station_count is an int on Country, Language and Tag, instead of a str. (#1555)
  • Two Station attributes are renamed: lastchange_time is now last_change_time, and lastcheckok is now last_check_ok. Station.to_dict() uses the new names as keys. (#1577)
  • Station.ssl_error can be None, as the API server declares it. (#1595)
  • Search filters work. name_exact, the other exact flags and the bitrate filters used to be ignored by the API, and search(filter_by=...) always failed. If you relied on the old (unfiltered) results, expect fewer, correct ones now. (#1552)
  • Errors. Everything the library raises is a RadioBrowserError, so one except covers it all. DNS failures and broken responses no longer leak raw exceptions, and a response that is not what it should be raises instead of passing as an empty result. A 4xx response raises a plain RadioBrowserError right away instead of a RadioBrowserConnectionError after five retries. (#1554, #1566, #1575, #1600)
  • Invalid arguments raise a RadioBrowserValidationError before a request is sent, for example a negative limit, a latitude of 91, an argument of the wrong type, an Order an endpoint cannot sort by, or filter_by without a filter_term. It is a RadioBrowserError and a ValueError, and its message names the argument, like value must be at least 0 at 'limit'. (#1567, #1571, #1576, #1597, #1602)
  • Fewer, cleaner results. stations() and search() leave out duplicate streams by default, and a page of results can be shorter than limit. Pass deduplicate=False to get every station, as before. (#1633)
  • Corrections are on by default. Corrected stations come back with their corrected fields, and the deleted duplicates do not come back at all, so a page of results can be shorter than limit. Duplicates are only deleted when they are barely played and a better record stays; the rest is left to the deduplication above. (#1604)
  • countries() now sorts by the actual country name, honors reverse, pages correctly, sorts accented names with their letter, and counts a country listed under a lowercase code only once. Country.code is always uppercase. (#1568, #1574)
  • Language.favicon links to the flag of the country a language belongs to, and is None for languages without one obvious country, like Arabic. It used to return a 404 for English, and the wrong flag for Arabic, Swedish and others. (#1559)
  • station_click() now returns the stream URL of the station, instead of None, and raises a RadioBrowserError with the reason when the API does not register the click. (#1561, #1589)
  • request_timeout now also covers the DNS lookup of the API servers. (#1569)
  • Empty comma separated station fields are [] instead of [""]. (#1554)

../Frenck

                       

Blogging my personal ramblings at frenck.dev

What's changed

🚨 Breaking changes

  • Sync repository tooling with the current library template @frenck (#1551)
  • Return station counts as integers @frenck (#1555)
  • Rename two Station attributes to match the others @frenck (#1577)
  • Validate the arguments of every public method with probatio @frenck (#1597)

✨ New features

  • Fix station search parameters and add search filters @frenck (#1552)
  • Add the remaining search filters @frenck (#1560)
  • Return the stream URL from station_click @frenck (#1561)
  • Expose the distance of geo search results @frenck (#1578)
  • Look up several stations by UUID, or by stream URL @frenck (#1580)
  • Filter countries, languages and tags by name @frenck (#1581)
  • List codecs and states @frenck (#1583)
  • Vote for a station @frenck (#1584)
  • List the states of a country by its country code @frenck (#1586)
  • Get the check and click history of stations @frenck (#1585)
  • Raise a RadioBrowserValidationError for invalid arguments @frenck (#1602)
  • Ship corrections for station data @frenck (#1604)
  • Correct Dutch stations from radio-database @frenck (#1605)
  • Correct stations from Mexico, from radio-database @frenck (#1608)
  • Correct stations from Hungary, from radio-database @frenck (#1606)
  • Delete duplicates filed under Afghanistan @frenck (#1610)
  • Correct stations from Finland, from radio-database @frenck (#1611)
  • Correct stations from Germany, from radio-database @frenck (#1613)
  • Correct stations from Austria, from radio-database @frenck (#1621)
  • Correct stations from Brazil, from radio-database @frenck (#1620)
  • Correct stations from Canada, from radio-database @frenck (#1616)
  • Correct stations from Belgium, from radio-database @frenck (#1617)
  • Correct stations from Indonesia, from radio-database @frenck (#1618)
  • Correct stations from United Kingdom, from radio-database @frenck (#1619)
  • Correct stations from Italy, from radio-database @frenck (#1614)
  • Correct stations from 34 more countries, from radio-database @frenck (#1622)
  • Correct stations from United States, from radio-database @frenck (#1607)
  • Correct stations from France, from radio-database @frenck (#1609)
  • Correct stations from Greece, from radio-database @frenck (#1612)
  • Correct stations from Spain, from radio-database @frenck (#1615)
  • Correct more stations from Russia, from radio-database @frenck (#1625)
  • Correct Chinese stations, from radio-database @frenck (#1626)
  • Correct more stations from the United States, from radio-database @frenck (#1627)
  • Correct more stations from Belgium, from radio-database @frenck (#1628)
  • Correct more stations from...
Read more

v0.3.2

Choose a tag to compare

@github-actions github-actions released this 25 Oct 23:14
b853d78

What’s changed

⬆️ Dependency updates

Read more

v0.3.1

Choose a tag to compare

@github-actions github-actions released this 12 Mar 21:13
637b457

What’s changed

🧰 Maintenance

  • 🎆 Updates maintenance/license year to 2024 @frenck (#631)

⬆️ Dependency updates

Details

v0.3.0

Choose a tag to compare

@github-actions github-actions released this 07 Nov 20:39
1ce39bf

What’s changed

✨ New features

v0.2.0

Choose a tag to compare

@github-actions github-actions released this 07 Nov 19:56
de2c0d2

What’s changed

🚀 Enhancements

🧰 Maintenance

⬆️ Dependency updates

Details
Read more

v0.1.1

Choose a tag to compare

@github-actions github-actions released this 09 Mar 12:05
91cf61b

What’s changed

🐛 Bug fixes

🚀 Enhancements

  • Re-init API servers on connection error @frenck (#25)

⬆️ Dependency updates

v0.1.0

Choose a tag to compare

@github-actions github-actions released this 21 Feb 00:14
f21b136

What’s changed

Initial release 🎉