Display stations without "Name: "

Discussion about my Wifi Radio project at http://mightyohm.com/wifiradio/ or my WL-520gU talk at NOTACON.
Post Reply
stighess
Posts: 3
Joined: Sat Aug 08, 2009 3:44 am

Display stations without "Name: "

Post by stighess »

Hi,

A few of my streams don't return a name, for example:

http://radio.hiof.no/nrk-p1-128
http://radio.hiof.no/nrk-p2-128

This one doesn't return a name either, but it does return a title, which doesn't get displayed:

http://radio.hiof.no/nrk-petre-128

I'm not very familiar with scripting, but is there a way we can have mpd return a (custom) Name? Something like mpc add http://whatever -t "Stationname"?

If there isn't is there a way I can modify the script to return the "file" parameter as a Name? That would be better than nothing. As things are now, the radio displays the last station with a name, which is misleading.

Thanks for any help.
User avatar
mightyohm
Site Admin
Posts: 1064
Joined: Fri Apr 03, 2009 10:29 pm
Location: Seattle, WA
Contact:

Re: Display stations without "Name: "

Post by mightyohm »

I guess I have been fortunate not to run across a stream with the name information missing, as I have not seen this problem before. :D

Sadly, I'm not aware of a way to "fake" the name that mpc returns.

I'll admit that the interface and display scripts are fairly simple, and do not have a built-in mechanism to handle these sorts of situations. Think of them more as a starting point for experimentation than a finished product (they will be forever in beta ;) ).

Both scripts are written in a shell scripting language that is very similar to what you would find on a real Linux system - most of the standard Linux commands are duplicated by busybox on the router. Any good book on shell scripting would be a good reference if you want to start playing with them, I used the one from O'Reilly as my only reference, and when I wrote these scripts I had no prior shell scripting experience. So if you fix this issue you will probably be an equivalent or better shell script programmer than me by the time you are done. :D
Post Reply