problem now playing script

You have a question or need an advice about how to do something? Ask it here!
Post Reply
friso
Posts: 173
Joined: 10 Apr 2012 10:05
problem now playing script

Post by friso »

Bernd

Has anything changed in the latest version what has to do with stream title updates?
I use these commands to sent album art and nowplaying to my website. From time to time something is comming thrue, but most of the time nothing has been sent to my mysql database.

I didn't change anything in the script, and i have looked in the database if the content is there, but what i see on the web is the same that's in the database.

So it looks like something doesn't go right. Here you have my command on stream title change
http://mydomainname.nl/proppfrexx/inser ... eratortext}

Also tried something. When i right click on the stream and manually update the stream content changes on the website.

Friso
User avatar
radio42
Site Admin
Posts: 8350
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: problem now playing script

Post by radio42 »

No, nothing has changed. I am using the same mechanism here as well (PHP and MySQL with a pretty similar command), I just doubled-checked this and it works just fine:
See here: http://radio.radio42.com/playlist.html

So I assume, that the issue must be somewhere on your PHP or MySQL side.
Maybe your 'moderatortext' contains certain funky characters, which let's your php or sql-insert statement fail?
friso
Posts: 173
Joined: 10 Apr 2012 10:05
Re: problem now playing script

Post by friso »

Bernd

But it worked before, and randomly tracks are displayed on the website, and then a couple of songs don't.
So it looks like the script is working ok.
Maybe you can post your script here so also others can benefit of this?

Can you tell me wich settings i should check for title stream to go right?

Friso
friso
Posts: 173
Joined: 10 Apr 2012 10:05
Re: problem now playing script

Post by friso »

Bernd

To your a) question, why is it randomly working. The system is running in nonstop mode, and there are some songs or jingles that are forwarded to the database with the php script, and then some titles after eachother doesn't.

The other strange thing is that when i put the http://mydomainname.nl/proppfrexx/inser ... p?artist=${artist}&title=${title}&albumart=${albumart}&modtext=${moderatortext}
in an user command, or when i attach it to let's say starting the streaming server. it ends up with nothing. So it looks like the artist and title is not send.

I also enabled all kinds of media to display in the song title update.
I also created a new database and added the kollums to it. Also that database is working strange the same way the original does.

Friso
User avatar
radio42
Site Admin
Posts: 8350
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: problem now playing script

Post by radio42 »

to a) as already explained : maybe because you are NOT handling special characters in your 'artist', 'title' or 'moderatortext' parameters?!

Of course, the used macros can only be evaluated in certain events, e.g. the Track macros are NOT available in the track events, e.g. OnTackPLay or OnSongTitleChanged.

You might simply repeat your test with a plain command NOT using any macros, e.g.:
http://mydomainname.nl/proppfrexx/inser ... p?artist=MyTestArtist&title=MyTestTitle&modtext=MyModText

And then see how this goes!

To remove special characters from your parameters you might use this little PHP function:
function clean($string)
{
return htmlspecialchars(strip_tags($string), ENT_QUOTES,'UTF-8',false);
}

Consult your PHP developer for more help if needed...
User avatar
radio42
Site Admin
Posts: 8350
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: problem now playing script

Post by radio42 »

friso wrote:But it worked before...
But that doesn't mean, that something has changed inside ProppFrexx!
You should debug and log your code on the web-site:
a) to make sure, that all update commands do arrive at the php level, e.g. just write whatever is posted into a log file
b) make sure, that all your sql-statements do execute successfully

On the ProppFrexx side you should check, that you are not suppressing certain song title updates, either in general (section 'Streaming', see 'Exclude from Title Updates') or on the script or track level, see the 'SuppressSongTitleUpdate' option setting on your script-line or in your track setting.
friso
Posts: 173
Joined: 10 Apr 2012 10:05
Re: problem now playing script

Post by friso »

Bernd

I have created a complete new code based on this topic and exec_writeplaylistfile
viewtopic.php?f=9&t=730

I also have managed to add albumart and moderator text to it.
Now i come across one problem. In my recently played list there are also the jingles that were played visible.
I confiugered in the general settings and then the streaming settings that all exept music, new music and hot are not published to the stream.

So you would think that jingles which are also marked that way are not displayed. But they are.
What can i do about it. I only want to display the played music tracks not the jingles.

Thanx
Friso
User avatar
radio42
Site Admin
Posts: 8350
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: problem now playing script

Post by radio42 »

Please show what exact settings you applied and where. And please show how you tracks have been tagged to ensure you really have set the media entry type. As for others this is working just fine.

Note, that the EXEC_WRITE_PLAYLISTFILE command is based on the Playback-History and that the Playback-History uses a different track filter (not the one on the 'Streaming' section): see general settings, section 'More Stuff' - 'Exclude:' next to the Playback History Count value!
Did you set these values here?
friso
Posts: 173
Joined: 10 Apr 2012 10:05
Re: problem now playing script

Post by friso »

Bernd

I didn't saw that option in more stuff. I have configured it, and now all works OK
Thanx

Friso
User avatar
radio42
Site Admin
Posts: 8350
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: problem now playing script

Post by radio42 »

Funny, as if that works, your 'other' approach should also work, as both are triggered in the same code block (they just a different filter, as explained) - so I assume, that the HTTP issue was indeed related to some PHP or MySQL error on the web-server side.

Post Reply