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

RDJ v2.0 Web Export Text Replacing?

Started by KJ6EO, September 16, 2018, 03:08:19 AM

KJ6EO

Hello and thanks for reading my Post.  I'm using the Now Playing Web Exporter to send my metadata to TuneIn.  However, at the top of the hour when I rapid fire my I'D's, Spots, Jingles, etc., TuneIn can't handle the repetition and the lock me out for 20 minutes.  Is there a way to set up my Action in the Web Exporter to do Text Replacing?  Thank you in advance for your help!

Brodephat

I'm not sure how you are posting to TuneIn but the best practice is to filter out everything but songs. This can be done inside the php script you may be using to post to TuneIn with.
"Think Outside The Box And Make Something Truly Wonderful Happen"

Youtube Channel: https://bit.ly/3fGBsKJ

My RadioDJ Stations:
NiaRadioNetwork.com
RealPeopleTalkRadio.com
TheTriadComeUp.com

Radio Imaging & Tools:
CarterScripts.com

Free RDJ Videos:
HowToUseRadioDJ.com

KJ6EO

Thanks for your suggestion.  I'm not using a PHP script to post to TuneIN AIR API.  I'm using a script with some variables set up in "Now Playing Info", "Web Export".  All I need is a variable that will prevent the Web Exporter from sending "Artist", "Title" information to TuneIn when a I.D, Jingle, Sweeper, or Spot plays.  All those have the Artist field set to "ID/PSA".  I did find the RDJv2.0 variables list but didn't find anything there that would work in my case.  The script is entered in the "Custom Data Field", and afterwards shows up in the box below under "Custom Data".  I think there has to be a simple solution to my problem.  Unfortunately, I just don't know how to do it.

stevewa

well, if you're using a magic script to send to TuneIn, put some logic in that script, so that when the artist data = "ID/PSA" it doesn't sent anything to TuneIn.

Beyond that, we can't help you unless you attach your script.

If we were clairvoyant, we would use our powers to steal money from Jeff Bezo's bank account, not magically be able to fix your script, lol!  :hihi:

PROducer

What you need to do is filter what you send to TuneIn by TRACK TYPE, so that only music  data is sent.

See this thread:  http://www.radiodj.ro/community/index.php?topic=11531

stevewa


KJ6EO

Before trying to implement the PHP script, I need to understand how to run the script.  I'm not posting to an external website, so there is no way to execute the script externally.  I need to send my Artist Title information directly to Tune In.  Putting (http://air.radiotime.com/Playing.ashx) in the URL of the Web Export Box.  How do I execute the script locally?  Do I call it up via a PATH statement in the Custom Data Box?  Any comments you might have would be appreciated.

PROducer

My RadioDJ computer is also running a WAMP server in the BG, so using the Web Export plugin, when the song changes, the web export plug executes the php script which sends the new song title, artist & album info to tune-in.

In the URL field of the plugin, you put the address of the php script.

stevewa

@KJ6EO since you are sending track metadata directly to TuneIn, without the use of a webserver script in between radiodj and tunein, you must use RadioDJ config options to control which metadata is transmitted to the NowPlaying plugin.

try this in Options > Stream Titles > Track data, use the pulldown to select sweeprs, erase all the token variables like $title $artist etc, so it is blank, and save. you might need to restart rdj to  put the new settings in effect.

now when rdj plays that type of track, it should not have any metadata to send to TuneIn, and therefore TuneIn should not freak out and suspend you

try it, and let us know

PROducer

Quote from: stevewa on September 20, 2018, 03:36:31 PM
@KJ6EO since you are sending track metadata directly to TuneIn, without the use of a webserver script in between radiodj and tunein, you must use RadioDJ config options to control which metadata is transmitted to the NowPlaying plugin.

try this in Options > Stream Titles > Track data, use the pulldown to select sweeprs, erase all the token variables like $title $artist etc, so it is blank, and save. you might need to restart rdj to  put the new settings in effect.

now when rdj plays that type of track, it should not have any metadata to send to TuneIn, and therefore TuneIn should not freak out and suspend you

try it, and let us know
I initially tried this, and it failed horribly for me, which is why I went the route that I did.  Especially when a teaser ran... three song titles in 30 seconds and TuneIn banninated me for 20 minutes.   :hihi:

KJ6EO... give it a try.  If it doesn't work, you will find out quickly!

KJ6EO

Quote from: stevewa on September 20, 2018, 03:36:31 PM
@KJ6EO since you are sending track metadata directly to TuneIn, without the use of a webserver script in between radiodj and tunein, you must use RadioDJ config options to control which metadata is transmitted to the NowPlaying plugin.

try this in Options > Stream Titles > Track data, use the pulldown to select sweeprs, erase all the token variables like $title $artist etc, so it is blank, and save. you might need to restart rdj to  put the new settings in effect.

now when rdj plays that type of track, it should not have any metadata to send to TuneIn, and therefore TuneIn should not freak out and suspend you

try it, and let us know

Thanks for this info but sadly, it didn't work.  I took the PHP script and edited it per the instructions here in the thread.  I do have a Linux Web Server here running Apache.  So I took the PHP script and put it in VAR/WWW.  Thats where my main personal web page is located.  If I open a browser and put in URL http://www.kj6eo.com/web-export.php  ... all that happens is that the browser downloads a copy of the script.  Is that what it's supposed to do?  On the Linux server using TCPDUMP, I can see that there is communication going on between the Automation Server running RDJ and the Web Server kj6eo.com.  However using TCPDUMP and watching the Internet Side of the Web Server (eth0) I don't see any communication between the Web Server and the Air API Server.  I'm not familiar with PHP scripts.  If it were Linux ... I'd have a much better chance of figuring it out.  Maybe this is just a lost cause in my case.  I can ask my Webmaster to install the PHP script on the Radio Station Website (www.qcountryscv.com).  Maybe then it would work?  Any other comments you might have would be appreciated.

PROducer

I put my .php script into it's own sub-folder (eg: C:\wamp64\www\send_to_tunein)

In the Now Playing Plugin, on the Web Export Tab, fill the URL field with the URL that points to the php script. (eg: http://www.kj6eo.com/web-export.php)

I've left the password filed blank and instead included xpwd=password in the custom data field. As for that my custom data looks like this:  xpwd=password&artist=$artist$&title=$title$&album=$album$&track-type=$track-type$

Method is POST & check the enable box.

stevewa

if your web browser is downloading the php script instead of running it, then your apache is not configured to process php files.

you can either try to fix that, https://stackoverflow.com/questions/5121495/php-code-is-not-being-executed-instead-code-shows-on-the-page

or put the php script on your other website if it is setup to process php scripts.

KJ6EO

Quote from: stevewa on September 21, 2018, 04:14:15 PM
if your web browser is downloading the php script instead of running it, then your apache is not configured to process php files.

you can either try to fix that, https://stackoverflow.com/questions/5121495/php-code-is-not-being-executed-instead-code-shows-on-the-page

or put the php script on your other website if it is setup to process php scripts.

Ok ... the first problem that I found was that PHP wasn't installed on my Ubuntu Web Server.  So, I figured
out what I needed including dependencies and installed everything.  Gee ... it works.  So, I edited the "web-export.php" script and put it in its own folder.  I set up the PATH and CUSTOM DATA in the WEB EXPORTER and saved it.  Gee ... doesn't work.  I ran the web-export.php script on my browser ... it says "Access Denied".  That makes sense because I didn't give the "xpwd".  So my question is, can I manually specify the xpwd when I try to run the PHP file in a browser?  Something like http://website/folder/web-export.php?xpwd=whatever?  I need to get past this "Access Denied" error.  Any thoughts/comments you might have would be appreciated.

stevewa

yes, put the xpwd=whatever, BUT it must match the password that is set inside the php script.

define('RDJ_PASSWORD', 'change this'); // RadioDJ Web Export password

i.e. if you set your password to 'KJ6EO', that must be the value in the web browser url