mAirList 1.5.28

Hi.

The weekend closes with another update. And with me translating the change log :wink:

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
  • FLAC: item data can now be save to the file tag

Torben

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

I will make all colors configurable soon.

Torben

(back from a working holiday in Northern Ireland)

The HTML script supplied with the latest release produces an error when ran from “Open … Run Script”. Doesn’t like “INotification”.

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.

Torben

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.

You need to write two ‘’ instead of '. But I admit that that is not very feasible to create a large web page this way.

How about using PHP? You can easily open and include text files there. Or server-side includes.

Torben

Yes, PHP would be easy. I’ll have to conjure-up some free time in which to work on it :wink:

OK - another request for this lovely script…

Any chance of a script parameter to ensure that only songs are updated ? ie: if length > 60 then do update

Something like that ? I don’t think many of our listeners care if we’re playing AD #434 or Jingle 6 (male talkup) :wink:

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;

end;[/code]

Torben

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:-

sl := TStringList.Create; sl.Add('<html>'); sl.Add('<head><title>Now Playing</title></head>'); sl.Add('<body>'); sl.Add('<align="left"><b><font face="Arial" size="1" color="#000000"> Playing Now: <a href="music.php#' + pi.GetArtist + '">' + pi.GetArtist + ' - ' + pi.GetTitle + '</a>'); sl.Add('</body>'); sl.Add('</html>'); sl.SaveToFile('c:\website\nowplaying.php'); sl.Free;

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.

Hmm. I couldn't get that to work - It produced a syntax error.

Note that the above posted code was not a complete script but only a fragment to replace the corresponding lines in the original script.

Torben

Torben,
I wonder if you could assist with this “length > xxx” code, please ? I’m using this script:

[code]var n: INotification;
pi: IPlaylistItem;
sl: TStringList;

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.)