Page 1 of 2
How can I get the title of the current playlist on my website?
Posted: 12 Feb 2018 11:03
by XTended
Hi Bernd,
How can I get the title of the current playlist on my website?
For example, at this moment the 'dance-classics' playlist is playing.
Like to have 'dance-classics' on my website.
Can I do that with 'PLS_CURRENT_FILENAME_GET' ?
I guess it's something like this:
PLS_CURRENT_FILENAME_GET D:\Websites\XTended\widget-playlist.php|D:\Websites\XTended\nowplaying.php
EXEC_UPLOAD_FILE D:\Websites\XTended\widget-playlist.php|
ftp://server25.hosting2go.nl/httpdocs/w ... e|password
Is this the way to do, or am I completely wrong?
Re: How can I get the title of the current playlist on my website?
Posted: 12 Feb 2018 12:40
by radio42
Yes, you are wrong, as the PLS_CURRENT_FILENAME_GET is a command to return the current playlist filename. But this value is not stored anywhere, a such it can only be used in a TCP interface.
You can use the ${cplname} or the ${plsname} macro to retrieve the name of the current playlist.
E.g. use this macro in your nowplaying.php template file.
Or use it in a EXEC_SEND_HTTP_GET command to submit it directly to your web-site...
Re: How can I get the title of the current playlist on my website?
Posted: 12 Feb 2018 15:31
by XTended
So I have to create it like this:
EXEC_SEND_HTTP_GET ${plsname} D:\Websites\XTended\widget-playlist.php|D:\Websites\XTended\nowplaying.php
EXEC_UPLOAD_FILE ${plsname} D:\Websites\XTended\widget-playlist.php|
ftp://server25.hosting2go.nl/httpdocs/w ... e|password
Re: How can I get the title of the current playlist on my website?
Posted: 12 Feb 2018 16:48
by radio42
No!?
Please take a look to the User Manual's Appendix what the control-commands resp. macros actually do.
EXEC_SEND_HTTP_GET sends certain data to a given URL, e.g. a php script - so your example doesn't do that.
The php script then on the server side might evaluate this data and process it further.
How do you today send your song-title info to the server?
Also see these threads:
viewtopic.php?f=9&t=759
Re: How can I get the title of the current playlist on my website?
Posted: 12 Feb 2018 17:00
by XTended
I send my song-title info to the server with this command (the way you teach me):
OnSongTitleChanged -> EXEC_WRITE_PLAYLISTFILE D:\Websites\XTended\nowplaying\widget-nowplaying.php|D:\Websites\XTended\nowplaying\nowplaying.php
EXEC_UPLOAD_FILE D:\Websites\XTended\nowplaying\widget-nowplaying.php|
ftp://server25.hosting2go.nl/httpdocs/w ... e|password
Re: How can I get the title of the current playlist on my website?
Posted: 12 Feb 2018 17:17
by XTended
Re: How can I get the title of the current playlist on my website?
Posted: 12 Feb 2018 17:42
by radio42
As said initially you can use the named macros than inside your nowplaying.php file like all the other macros you are alread using inside it.
Re: How can I get the title of the current playlist on my website?
Posted: 12 Feb 2018 23:03
by XTended
Sorry for not understanding you.
The playlist name is not transfering at the same time as the nowplaying info, cause when I look inside my nowplaying.php file no current playlist is written there <p>Schedule: ${plsname}</p>
Bernd, can you give me a little bit more info how to get that current playing playlist name on my site?
Re: How can I get the title of the current playlist on my website?
Posted: 13 Feb 2018 00:10
by radio42
Please try the ${cplname} macro instead.
Re: How can I get the title of the current playlist on my website?
Posted: 13 Feb 2018 11:17
by XTended
In the nowplaying.php file I have both macros now: <h3>Schedule: ${plsname} ${cplname}</h3> but nothing happened.
Check online:
https://xtendedradio.com/listenlive.php (nowplaying.php is an include).
Has it something to do with exclusions, now only music is active, see attachment.[attachment=0]PF-events.jpg[/attachment]