Thank you for your donation!

Idea: radio stations collection
Hi moode-family,

do you like to find new radio streams of your taste? Commercial free and with stream qualities of 128 kB/s or better? Please post your collections within a (.zip-) folder Smile 

I prefer modern jazz, bluesy guitars, classics with almost "constant mood" (nothing that hits you in the face after you just got off your daily stress), sometimes virtuosic rock and finally good pop music.

If this idea is suitable to this board I will post my collection soon.

Happy listening Smile
We love music.
The website presents files with radio stations from almost all over the world. The problem is, after picking up such a peak with someone's tool to bring out what interests us. For now, with the help of Excel, I manually extract stations that interest me, but an automatic tool would fit.
Quote:most sites I find unhelpful in finding the source url
I'm sure you have a much better and faster way than this but here is what works for me....may be of use to other cli challenged folk ;-)

Using Firefox, find a station and start it's web player.....
once audio is heard select the 'lock' icon....and the site info box opens..
select the '>' next to 'connection not secure' and that opens 'connection details'...
select 'more information'  and that opens Page Info window at Security...
select Media and then scroll until you find "audio' in the the 'Type' column....

That's the stream you need... Smile   Right click and copy then paste into Moode's new station url field...


Attached Files Thumbnail(s)
Hi, that is  a nice way to integrate new stations. I tried it with OUI FM and the stream introduced a german commercial although it is a french station... Approx every 20 minutes there is another commercial. Thus I deleted the station but I am still trying out others (commercials always suck!).

Enjoy the music Smile
We love music.
Do you mean a third party advertising commercial or the stations ID jingle ? :-)

We get an announcement " Oui Rock 70's" (or whatever the Oui station is we're listening to ) in very heavily accented (French) English....
Actually find it very quaint and laugh each time....mental image of Peter Sellers and the Pink Panther ;-)
A third party advertising commercial!
We love music.
Haven't seen anyone mention the Community Radio Browser

Can't imagine there are many Internet stations of any worth which haven't been catalogued there. It's a database with a UI so you can browse or search the contents of some 29000 entries, and download the results as .pls, .m3u, or .xspf files. You can submit new or revised entries as well.

Even has a real API, used by, for example, the RadioDroid app I have on my phone. Thought about creating a similar moOde UI panel for it but I already got the stations I like added into the existing collection.

As for ads, it costs serious money to stay "on air". SOMA and Jazz Groove are two examples of great stations which depend on voluntary donations and their backs are constantly against the wall. A tiny fraction of those who listen also donate, not just once but regularly. I support the stations I listen to regularly and vice versa.

Hi Kent... yes the,  
Code:]Community Radio Browser
is long as you know what you are looking for... Big Grin 

Often serendipity finds a stream and having a way to discover the true stream is helpful. Wink

The Firefox lookup has image options too for MoOde station logos..;-)
Like my grandmother used to say, there's more than one way to skin a cat.
(12-17-2019, 06:39 PM)duracell80 Wrote: Ok, so after looking around for a while, I think this dev over here: and here offers the best head start I can see on getting some user friendliness in to radio in my package manager.

I'm proposing to build this so that there's a web UI independent of moode for now accessible from localhost. I Figured out a bash script that can be the basis of "previewing a station" in Moode before adding it to let's say a radio pack. There might also be a way to say on startup look up the community database for say a genre tag and use that as the basis for automating a smart radio list.



sudo echo "#EXTM3U \n" > /var/lib/mpd/playlists/RadioPlay.m3u
sudo echo "#EXTINF:-1, RadioPlay: Audio Sent via API" >> /var/lib/mpd/playlists/RadioPlay.m3u
sudo echo $1 >> /var/lib/mpd/playlists/RadioPlay.m3u

mpc clear
mpc load RadioPlay
mpc play

Usage after chmod+x:
./ ""

With that script it should be easy enough to build a "play in moode" URL say

That script doesn't do what you think it does, primarily your use of sudo with the 'echo' bash built-in. You're assuming you can append to a file with effective root privileges by doing that but no that's not the case.

Best practice is to not use sudo in a script at all, put in a test that exits with a message if it's not being run by root, then run the script as the root user. Such a test might look like this;
whoami | grep -q root || ( echo "You're not root!" ; exit 1 )

If running as root but you intend for the mpc command to be run as 'pi' then use su, e.g.
su - pi -c "mpc clear ; mpc load RadioPlay ; mpc play"

On the other hand if you're determined to use sudo in your script one would have to do this...
echo "some string" | sudo tee outputfile
echo "appended string" | sudo tee -a outputfile

You have the same file path in your script multiple times, use a variable instead that's what they're for.
As the root user's umask on Moode is 0022, you should also put in a 'chmod a+rw' on the new playlist so mpd can change/delete it.

Forum Jump: