Thank you for your donation!


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


Problem: Converting Radio stations from Volumio.
#1
Hi

I have a number of radio stations, which works in Volumio, which I try to activate in moode audio:

I have tried 2 different ways:
1) Add the station manually using the web page

The url of the stream are like: http://opml.radiotime.com/Tune.ashx?id=s64589

which I modified (after the first failed) to http://opml.radiotime.com/Tune.ashx?id=s64589#.mp3

"Failed to decode http://opml.radiotime.com/Tune.ashx?id=s64589#.mp3; avformat_open_input() failed: Invalid argument"

2) Add .pls files in /var/lib/mpd/music/RADIO and regenerate the music library

The added stations never show up in the web.

nor do they get listed with "moodeutil -u"

Can someone please give me a hint, what I need to do ?

thanks in advance.
rgds
Jan I.
Reply
#2
Those links are prolly redirects to the real playable URL which can be fished out using the handy commands below.

Code:
pi@moode:~ $ wget http://opml.radiotime.com/Tune.ashx?id=s64589
--2023-07-06 18:11:45--  http://opml.radiotime.com/Tune.ashx?id=s64589
Resolving opml.radiotime.com (opml.radiotime.com)... 104.17.106.184, 104.17.107.184
Connecting to opml.radiotime.com (opml.radiotime.com)|104.17.106.184|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 74 [audio/x-mpegurl]
Saving to: ‘Tune.ashx?id=s64589’

Tune.ashx?id=s64589                           100%[===============================================================================================>]      74  --.-KB/s    in 0s      

2023-07-06 18:11:45 (1.18 MB/s) - ‘Tune.ashx?id=s64589’ saved [74/74]

pi@moode:~ $ ls
devutl.sh   piano.sh  'Tune.ashx?id=s64589'

pi@moode:~ $ cat Tune.ashx\?id\=s64589
https://dispatcher.rndfnk.com/crtve/rner3/main/mp3/high?aggregator=tunein

I created a new radio station with the URL below and it plays fine. It sounds like a Latin dance beats station?
Code:
https://dispatcher.rndfnk.com/crtve/rner3/main/mp3/high?aggregator=tunein

   
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#3
(07-06-2023, 10:36 PM)Tim Curtis Wrote: Those links are prolly redirects to the real playable URL which can be fished out using the handy commands below.

Code:
pi@moode:~ $ wget http://opml.radiotime.com/Tune.ashx?id=s64589
--2023-07-06 18:11:45--  http://opml.radiotime.com/Tune.ashx?id=s64589
Resolving opml.radiotime.com (opml.radiotime.com)... 104.17.106.184, 104.17.107.184
Connecting to opml.radiotime.com (opml.radiotime.com)|104.17.106.184|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 74 [audio/x-mpegurl]
Saving to: ‘Tune.ashx?id=s64589’

Tune.ashx?id=s64589                           100%[===============================================================================================>]      74  --.-KB/s    in 0s      

2023-07-06 18:11:45 (1.18 MB/s) - ‘Tune.ashx?id=s64589’ saved [74/74]

pi@moode:~ $ ls
devutl.sh   piano.sh  'Tune.ashx?id=s64589'

pi@moode:~ $ cat Tune.ashx\?id\=s64589
https://dispatcher.rndfnk.com/crtve/rner3/main/mp3/high?aggregator=tunein

I created a new radio station with the URL below and it plays fine. It sounds like a Latin dance beats station?
Code:
https://dispatcher.rndfnk.com/crtve/rner3/main/mp3/high?aggregator=tunein

Yes it is a radio station for my wife. 

Why did I not think that it was a redirect, THANKS for the tip.
Reply
#4
Computers can do this sort of thing far more easily than us mere humans.

It would be great if Moode's "Add radio station" function could do this figuring out for us.  Of course, with dynamic feed content, this could be delayed until we decide to play a station or add it to a playlist.

Just a thought.

Phil

Reply
#5
(07-07-2023, 07:26 PM)philrandal Wrote: Computers can do this sort of thing far more easily than us mere humans.

It would be great if Moode's "Add radio station" function could do this figuring out for us.  Of course, with dynamic feed content, this could be delayed until we decide to play a station or add it to a playlist.

Just a thought.

Phil

I just guessed that the link might be a playlist file or redirect to a playable URL. If someone comes up with reliable code  to automate this I'll take a look at it.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#6
I converted around 20 stations using the formula Tim gave, and while doing so I made a couple of observations:
- many of the stations had 2 stream links, seems to be redundancy or backup streams. Something we should think of implementing (if this is something normal).
- A few stations had a correct stream, but was not broadcasting, making it more difficult to automate
- A single station had a stream that works in safari on my mac, but not on my rpi, no idea why.

Please see this as information to anyone who start making reliable code. I have solved my problem, with big thanks to Tim.
Reply
#7
The Radio Station feature in moOde is a set of curated stations including metadata and cover art, each with a single playable URL. The URL is what MPD maintains in its Queue and is used by other code in moOde as the search key to the cfg_radio SQL table to fetch the metadata and cover art for display in the UI.

This design makes it impractical to have more than one playable URL for a station since this would involve duplicating data in cfg_radio among other things.

You can still add a Playlist to the Queue containing multiple playable URL's for a given station but unless a URL is defined in cfg_radio no cover art or station metadata will be displayed.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply


Forum Jump: