• Welcome to RadioDJ - Free Radio Automation Software Forum. Please log in or sign up.

Selectable Track Type to TuneIn API

Started by PROducer, April 26, 2018, 06:01:29 AM

PROducer

It took me awhile to find and then finally get my metadata feed to TuneIn working without making their computers go bananas when IDs & Teasers played, so I'm going to share what's working for me. I'm hoping this solution is much easier to find!

I found a php script by Andy DeGroo posted quite a while ago on this forum, but it was buried about 6 pages deep, and there was debugging going on throughout the thread, and then finally a version that was able to only send data for certain types of files. (ie: music).  I used that script, and changed it to also have the album title sent to TuneIn. The code for that is attached in the .zip file.

Create a folder on your website. I called mine tunein-api but what it's called doesn't matter. Copy the above code and paste it into a text editor (like notepad, or notepad++) Change 'RDJ_PASSWORD', $partnerId, $partnerKey, and $stationId.  Remove the double slashes (uncomment) from in front of the track types you want to have show on your TuneIn Feed.  Also, add the double slashes (comment out) any track type you do not want to show in your feed.  In the attached file, I'm only sending data for Music & Request track types.  Save the file in that folder as web-export.php

Then in the Now Playing Plugin, you need to create a new Exporter and in the URL field fill in the following:

http://yourwebsitesurl/thefolderyoucreatedforthephpfile/web-export.php

and in the custom data field:

xpwd=samepasswordthatsinthephpfile&artist=$artist$&title=$title$&album=$album$&track-type=$track-type$

Make sure the Method is set to POST
Check the Enable and Active checkboxes, and save the Exporter settings.

Now whenever the song changes, your TuneIn should too.


[attachment deleted by admin]