DJ Cassio wrote:
TPUB is not a field in the songlist. label is, assuming your field is populated in the database you can view it for the currently playing song like this.
Code:
var Song : TSongInfo;
Song := ActivePlayer.GetSongInfo;
if Song = nil then
WriteLn('No song loaded!')
else
begin
WriteLn('Label: '+Song['label']);
end;
Song.Free;
What are you trying to accomplish?
First of all: thank you to have moved the topic in a more appropriated section and sorry for my mistake.
What I would like to do with the script, is append the Song'label' to the GET query (I'm also wondering if it's possible to send by POST instead of GET but I will see it in a second moment)
The Field LABEL was populated. But I got an empty variable when I got it with the simple code I showed on my post.
Hence my topic here
EDIT
Please here my full code
Code:
IF Song['label']<> '' THEN
SongLabel := '&label=' + URLEncode(Song['label'])
ELSE
SongLabel := '';