Show information on currently played song

1

I plan on showing the currently played song on my desktop (preferably using GeekTool). It would be even better if it is possible to switch the radio channel. Any hints on how to start this project (I don't mind programming a bit)? I currently use the default server.

Bixer

Posted 2011-10-23T12:39:37.147

Reputation: 11

Answers

0

You can open the Squeezebox Server control page in a web browser with the URL: http://<server_address>:9000/. There you can select a Squeezebox client in the drop-down menue, then control it or watch what is currently played.

Perhaps there is some API for this; anyway I hope this can point you in the right direction. :-)

maxelost

Posted 2011-10-23T12:39:37.147

Reputation: 2 191

0

To give you an idea of where to start...

Much depends on what version you're using. The newer versions are supposedly JSON based.

I use the older version, which includes a telnet interface. If you have the older version, try the following, with your client connected and playing.

telnet YourServerIP 9090
display ?

It'll return a line which will need a bit of parsing, but will contain the title of the currently playing song.

If you don't like working with the command line: use code to pull the following URL:

http://ServerIP:9000/status.txt

In either of the above, the data is a "pull". I'm not sure if the server has a "push" available.

The telnet bit, I got from a document that I've had for years. Not sure if it's available online anymore. The URL piece: I looked up on: http://www.fact4ward.com/blog/not-done-yet/squeezebox/

Hope this helps.

joat

Posted 2011-10-23T12:39:37.147

Reputation: 466

Additionally, a "push" function might be created by using Liquidsoap to monitor the currently playing song and send a growl msg (or similar) when the song changes. I need to look at this. – joat – 2013-07-20T01:08:42.400

Your question got me interested in the Liquidsoap solution. I now have a short liq script that monitors Icecast for the start of a new song and puts a pop up on my screen with the band and title, via notify-send. Yell if you want it. – joat – 2013-07-28T05:49:59.103