Page 1 of 2

Using the TuneIn.com AIR API with ProppFrexx

Posted: 10 Apr 2014 21:03
by radio42
The tunein.com AIR API allow broadcasters to send radio directory content to TuneIn in realtime - i.e. to update the 'Now Playing' information.
This little tutorial describes how to implement this within ProppFrexx ONAIR.
The TuneIn AIR API is described here: http://tunein.com/broadcasters/api/

The AIR API is basically a simple HTTP GET to send whenever a new track starts playing. And ProppFrexx supports exactly this out of the box very easily via its internal event system and its flexible control-commands as well as command macros.

The event to use best for this purpose is the Streaming.OnSongTitleChanged, as this event is exactly triggered with each new track being played and it also considers all the exclude filters and other 'Song Title Update' settings as configured in the 'Streaming' section.

The control-command to send a HTTP GET request is EXEC_SEND_HTTP_GET, this allows you to specify any arbitrary URI/URL as its parameter (as well as an optional username and password in case the server requires a basic authorization, which in this case is not needed).
As its parameter you directly use the URL as given in the AIR API documentation, but you can use the track macros ${title}, ${artist} and ${album} which are then replaced by the effective content whenever the song title change event is being triggered.

Example control-command for the Streaming.OnSongTitleChanged event:

Code: Select all

EXEC_SEND_HTTP_GET http://air.radiotime.com/Playing.ashx?partnerId=<partnerid>&partnerKey=<partnerkey>&id=<stationid>&title=${title}&artist=${artist}&album=${album}
Please replace <partnerid>, <partnerkey> and <stationid> with your effective ids/keys as received from tunein.com!

As you can see, a single control-command can be used to implement the TuneIn AIR API - how simple is that?!

Re: Using the TuneIn.com AIR API with ProppFrexx

Posted: 18 Apr 2014 16:56
by friso
Bernd

Is it also possible to send the information to tunein, and recieve the album art, so it can be displayed on a website?

Re: Using the TuneIn.com AIR API with ProppFrexx

Posted: 18 Apr 2014 19:47
by radio42
No, that service is an internal service of tunein and they do not offer that to the clients.

Re: Using the TuneIn.com AIR API with ProppFrexx

Posted: 19 Apr 2014 12:10
by friso
Bernd

That's clear,
But when i use the build in functionality i have to make sure all the songs have album art.
So it would be nice to have a feature to auto add album art for selected or all tracks.
Maybe it can be added to the edit tags. You can do manually things per track there.
But in batch would be nice.

Is this possible?

Friso

Re: Using the TuneIn.com AIR API with ProppFrexx

Posted: 19 Apr 2014 15:53
by radio42
There are no plans to add such a batch feature to ProppFrexx!

Also when you look to similar apps there are all pretty bad in detecting the correct image. Even the internal tunein.com service is often picking an incorrect album art.

There are a few services out there, but they are pretty expensiv. Would you pay a couple hundred euros every month for it?

Re: Using the TuneIn.com AIR API with ProppFrexx

Posted: 09 May 2016 21:19
by XTended
Hi Bernd,

Just a question when using the TuneIN API:

EXEC_SEND_HTTP_GET http://air.radiotime.com/Playing.ashx?p ... um=${album}

Do I have to include these tages too "< >" (<partnerid>, <partnerkey> and <stationid>) for getting this little script working?
Or without those tags?

Re: Using the TuneIn.com AIR API with ProppFrexx

Posted: 10 May 2016 06:21
by radio42
It's without the <> !

Re: Using the TuneIn.com AIR API with ProppFrexx

Posted: 14 May 2016 18:22
by XTended
Thanks!

Re: Using the TuneIn.com AIR API with ProppFrexx

Posted: 07 Feb 2019 13:36
by yourx
Is there something changed proppfrexx is saying - The control command parameter contains macros - What is wrong in this line title=${title}&artist=${artist}&album=${album}

Re: Using the TuneIn.com AIR API with ProppFrexx

Posted: 07 Feb 2019 15:20
by radio42
You probably hit the TEST button?!
The message is just a warning saying, that with the Test button it cannot evaluate certain macros.
E.g. the ${artist} macro is a track related macro, which is only availbale with certain events, e.g. the OnSongTitleChanged or OnTrackPlay event. But it is not available with the TEST button.