Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Instruction Guide Exporting/Importing Radio Stations
#52
Hi, I don't know if I've "reinvented the wheel," but based on the experiences mentioned above and needing to reload some Italian stations, I wrote a Python script that automates a few tasks:
  1. It downloads the configuration using the Station Manager utility.
  2. It retrieves a list of radio stations via the Radio-Browser API (I filtered n Italian radios and m Tuscan radios within the script).
  3. It attempts to download the station logo if available, converting it from PNG to three JPG formats; if no logo is provided, it assigns a default.jpg (which I took from Moode).
  4. It merges the data with the Moode backup, avoiding duplicates, and generates both a JSON file and an icon folder.
  5. It creates a ZIP file and reuploads it using the radio_station utility.
I'd say it works fine, apart from the hardcoded filters, which aren't pretty but get the job done.

I was going to ask for the third functionality! Is it possible to add it to moodeaudio. As we write the website of a station, when storing a new one, it is nice to grab the icon from the site automatically. Thank you.
Reply


Messages In This Thread
RE: Exporting/Importing Radio Stations - by ListenToMusic - 06-18-2025, 12:53 PM

Forum Jump: