The weekend closes with another update. And with me translating the change log
1.5.28 (2006-09-17)
Hotkeys: can now be defined as non-global (default)
Cartwall: toolbar finally in English
Bugfix: Delete key deletes wrong items
Playlist: item color now also applied to left-most column
Playlist: History: all columns displayed gray
Playlist: History: time is displayed for non-playable items
Player: new options âactivate loggingâ and âactivate database loggingâ
(items are only logged if both this option and the global logging option is set)
radioDB2: rotation and category content is sorted by artist
Torben, Would it be possible to make the default background colour default for the playlist history entry(ies) black or configurable, making it easier to read the details of the previously played songs(s) when back announcing one, or more most recently played items?
Thank you
Sure. Because itâs a notification script. The INotification interface is only available in notification scripts. (As well as the GetNotification function etc.).
There is no sense in running that script as an ordinary script anyway. Its purpose is to write a log file, being invoked each time a player is started.
Ah - Iâve got it now, found it in the Config program. Works fine, although we may have to re-think our website plans - as weâve got Javascript for the onair names/shows - These have plenty of â symbols, and may screw-up the MLS script if we have the whole page in that.
I guess the only way around it is to put the Now Playing info from mAirList into itâs own HTML file and load it as an IFRAME perhaps.
Sure, you can determine the duration by calling GetDuration. Itâs in 1/10,000,000 seconds. Just change the code like this:
[code] if (n.GetNotificationType = ntPlayerStart) then begin
// interface #1 contains a reference to the playlist item
pi := IPlaylistItem(n.GetInterface(1));
if (pi.GetDuration > 600000000) then begin
sl := TStringList.Create;
(... as before ...)
end;
Hmm. I couldnât get that to work - It produced a syntax error. Iâll do further debuggin on it tomorrow, but I do have a nice script which others may find useful:-
This creates a hyperlink of your Artist - Title and points to a page called music.php with a Bookmark point relating to your Artist. This allows you to refer listeners to a page featuring artist/band information.
begin
// fetch notification data
n := GetNotification;
if (n.GetNotificationType = ntMask) then
// we want to be notified when players start
SetNotificationTypes([ntPlayerStart])
else
if (n.GetNotificationType = ntPlayerStart) then begin
// interface #1 contains a reference to the playlist item
pi := IPlaylistItem(n.GetInterface(1));
if (pi.GetDuration > 600000000) then begin
sl := TStringList.Create;
sl.Add(pi.GetArtist);
sl.SaveToFile('C:\Program Files\mAirList\RDS Now Playing.txt');
sl.Free;
end;
end.
[/code]
⌠But I get an error on Line35 (the end) saying âidentifier expectedâ⌠The idea being that only items over 1minute are sent to the RDS text file.
Add another âend;â befor the final âend.â. (Thereâs an open âbegin/endâ block starting at the line where you compare the duration to 6000000.)