06-11-2023, 12:24 PM
(06-11-2023, 09:13 AM)haeckse Wrote: Hey all,
A while ago I've created a React web client for streaming internet radio: RadioMii
The client pulls the info about the streams from radio-browser.info
Favorites created in RadioMii can be exported with XSPF or M3U format.
As it seems, Moode does not provide an option yet to import radio stations via M3U files. When I copy a M3U file to /var/lib/mpd/playlists, its radio stations don't appear in the UI, presumably because of missing entries in the db and missing cover images.
Looking into Moode's default radio playlist, the #EXTIMG tag shows that the station images seem to be stored locally, so the images are presumably referenced in the db entries then:
Code:#EXTGENRE:Various
#EXTIMG:local
http://subfm.radioca.st/Sub.FM
http://kdhx-ice.streamguys1.com:80/live
I wonder if there is a way on console level to do a M3U bulk import with fetching station images dynamically and write them to Moode's database. I could adjust the RadioMii M3U export so that it contains the link to an image in #EXTIMG and also some other data like the stations genre, homepage, language, country, bitrate etc. as extended info key-value pairs.
Cheers
Andrea
Hi, Andrea.
moOde stores data about radio stations in three places:
- individual .pls files in /var/lib/mpd/music/RADIO
- logo images (and thumbnails) in /var/local/www/imagesw/radio-logos
- entries to link the above together along with various metadata in the cfg_radio table of moOde's database /var/local/www/db/moode-sqlite3.db
I'm thinking a quick-n-dirty solution to the problem you pose is to write some code to convert your .m3u files and image files into a form which fits what station_manager.py already does. But it's up to you how you want to slice-and-dice the problem.
Regards,
Kent
PS - .m3u files are used in moOde only to store playlists.