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

TuneIn API Integration

Started by afrodread, July 17, 2014, 09:01:08 PM

makmb

#90
Quote from: Marius on July 17, 2014, 09:14:27 PM
The link you've posted is pretty self explanatory.

You must send a link in this format:
http://air.radiotime.com/Playing.ashx?partnerId=<id>&partnerKey=<key>&id=<stationid>&title=Bad+Romance&artist=Lady+Gaga

Open Now Playing info and in Web Export tab enter this:

On URL:
http://air.radiotime.com/Playing.ashx

On Custom Data:
partnerId=<id>&partnerKey=<key>&id=<stationid>&title=$title$&artist=$artist$

Make sure that you replace the <id> <key> and <stationid> with your data.

Set method to GET and check the Enable check-box.


Can not manage to send data to tune in

Url is the following :http://air.radiotime.com/Playing.ashx?partnerId=IU*kuUbu&partnerKey=******=s202294&title=$title$&artist=$artist$

(Removed partner Key) Please don't post keys on here.

[attachment deleted by admin]

jbrooks

Try moving the question mark down to the second slot. Not sure if that will help, as I am having the same issue. Also note that Tunein is moving to a Freemium service. Not sure what changes that will mean for content providers. I haven't changed my settings and my metadata has stopped pushing to Tune in... for at least the passed few months.

Marius

Sorry, somehow i missed @makmb's post.

In the url you don't have to add the "?" character.
The url is:
http://air.radiotime.com/Playing.ashx
and the argument (custom data in which you have to replace the data with the rdj variables) is the rest:
partnerId=<id>&partnerKey=<key>&id=<stationid>&title=Bad+Romance&artist=Lady+Gaga
DOWNLOADS PAGE

HOW TO FIX RADIODJ DATABASE
----------------
Please don't PM me for support requests. Use the forums instead.

makmb

Quote from: Marius on September 16, 2015, 08:27:44 AM
Sorry, somehow i missed @makmb's post.

In the url you don't have to add the "?" character.
The url is:
http://air.radiotime.com/Playing.ashx
and the argument (custom data in which you have to replace the data with the rdj variables) is the rest:
partnerId=<id>&partnerKey=<key>&id=<stationid>&title=Bad+Romance&artist=Lady+Gaga

Thanks for the tip. It worked that way. It just needs to leave in custom data, title and artist as it is:
partnerId=<id>&partnerKey=<key>&id=<stationid>&title=$title$&artist=$artist$
!!! Only change red data!!!


70vibe-FM

Quote from: AndyDeGroo on August 02, 2014, 06:31:43 PM
No, I didn't mean that your keys were wrong. It wasn't working because you had left "<" and ">" in the url.

To put it bluntly;
This was wrong:

http://air.radiotime.com/Playing.ashx?partnerId=<CXXXXXYi>&partnerKey=<_aXXXXhKNopL>&id=<s209409>


This is correct:

http://air.radiotime.com/Playing.ashx?partnerId=CXXXXXYi&partnerKey=_aXXXXhKNopL&id=s209409


Please pay more attention to instructions and try to understand what you are doing. I've learned many things by trial and error and you should too.

rudyz

Please forgive me if I am hijacking this thread, but I thought this the best place to ask the question.

How do I avoid sending artist and title info to TuneIn for commercials and other non music tracks?

The problem is that when using the API, TuneIn attempts to load album art based on the title and artist listed with the commercial file in RDJ. This is despite the fact that in Options/Stream Titles, I have specified $station_name$ - $station_slogan$, or nothing at all for commericals, and other non music files like news and sweepers, etc.

TuneIn API accepts a string such as commercial=true, for which it ignores the artist and title and instead displays the station summary and logo in the TuneIn database.

So my workaround is to make all album info for commercials be "true" in RDJ and in my Web Export URL sent to the API I use commercial=$album", which TuneIn then receives as commercial=true.

This works as a work around but surely I am doing something wrong or there is a better way to do this, as I foresee problems in the future when I need to use the correct album info for these files instead of using "true" in order to get TuneIn to ignore the artist and title info with commercials, news, sweepers, etc.


Valdis

Quote from: rudyz on October 11, 2015, 07:24:11 PM
Please forgive me if I am hijacking this thread, but I thought this the best place to ask the question.

How do I avoid sending artist and title info to TuneIn for commercials and other non music tracks?

The problem is that when using the API, TuneIn attempts to load album art based on the title and artist listed with the commercial file in RDJ. This is despite the fact that in Options/Stream Titles, I have specified $station_name$ - $station_slogan$, or nothing at all for commericals, and other non music files like news and sweepers, etc.

TuneIn API accepts a string such as commercial=true, for which it ignores the artist and title and instead displays the station summary and logo in the TuneIn database.

So my workaround is to make all album info for commercials be "true" in RDJ and in my Web Export URL sent to the API I use commercial=$album", which TuneIn then receives as commercial=true.

This works as a work around but surely I am doing something wrong or there is a better way to do this, as I foresee problems in the future when I need to use the correct album info for these files instead of using "true" in order to get TuneIn to ignore the artist and title info with commercials, news, sweepers, etc.

Have you tried using "commercial=true" instead of "commercial=$album$" in titles configuration? That should work and you would not have to set album titles to "true".
I am, therefore I think.
I design and develop web apps, and have created few RadioDJ plugins - https://axellence.lv/downloads/

PrairieGhost

#97
I have the AIR API working but after the show is on for a while it defaults back to my station name only without the show info. Anyone know what might be causing this?

Never mind I guess this is a normal thing with tunein.

xtrabeat

Hello everyone, I have some doubts ... To TuneIn present our songs, just fill the webexport? is instantaneous updating?

xtrabeat

Good afternoon someone to help me with the air TuneIn api?
The setting can be made only by radiodj?

Valdis

If anyone who is following this thread wants a better web export plugin which supports track type filtering for posting to TuneIn, there is one now. Take a look at Web Export NG plugin - Advanced web export.
I am, therefore I think.
I design and develop web apps, and have created few RadioDJ plugins - https://axellence.lv/downloads/

kegham

#101
<?php

// TuneIn Air API PHP Script for IceCast - AutoDJ support
// CODE HAS BEEN WRITTEN BY KEGHAM DEPOYAN
// http://www.radioarev.com | info@radioarev.com
// Add this script to cron job run every ( Min 15 seconds - Max 1 Min )
// Make sure HTTP WRAPPER must be enabled on your server PHP.ini. ni order to use ( file_get_contents ) function.
// https://cron-job.org \\
//  :) Hope this will help someone who need :)

// -------------------------------------------------------------------------------------\\

// TuneIn API settings
$PartnerID  = 'xxxxxxxx'; // TuneIn partner ID
$PartnerKey = 'xxxxxxxxxxxx'; // TuneIn partner key
$StationID  = 'sxxxxxx'; // TuneIn station ID

// Get file content from streaming server and decode output
$url = 'http://yourstreamingserver.com/rpc/username/streaminfo.get';
$filestring = file_get_contents($url);
$decode = json_decode($filestring, True);

// Read output arrays and seperate them by Artist & Title
$read_artist = $decode['data']['0']['track']['artist'];
$read_title = $decode['data']['0']['track']['title'];

// Urlencode them to send over http://air.radiotime.com ( Tune In )
$artist = urlencode($read_artist);
$title =   urlencode($read_title);

// Finally Send over the required information with all variables
$tunein = "http://air.radiotime.com/Playing.ashx?partnerId={$PartnerID}&partnerKey={$PartnerKey}&id={$StationID}&title={$title}&artist={$artist}";
file_get_contents($tunein);

?>

Valdis

Hi Kegham,

You should probably edit your post and remove the BBCode [color] tags from the code sample. Other BBCode code tags are not parsed inside a code tag.
I am, therefore I think.
I design and develop web apps, and have created few RadioDJ plugins - https://axellence.lv/downloads/

DJ Garybaldy

Quote from: Valdis on October 09, 2016, 12:15:57 PM
Hi Kegham,

You should probably edit your post and remove the BBCode [color] tags from the code sample. Other BBCode code tags are not parsed inside a code tag.

That maybe my fault it was originally posted without [ code] tags I'll re edit it to remove all the BB code.
Worlds Biggest Fan of RadioDJ

Install MariaDB https://djgarybaldy.blogspot.com/2020/08/installing-maria-db.html

Install RadioDJ: https://djgarybaldy.blogspot.com/2020/08/how-to-install-radiodj-free-radio.html

Into Internet radio for 25 years 1999-2024

RadioDJ 2045 MariaDB 11.2 Windows 11

kegham

Ok sorry for that one yes you were right the color code etc was annoying. I do remove it so its good now and clear   :)