Now Playing Script (website)

Hi All,

I’ve done a browse on the forum and can’t seem to find the answer, only mentions of such a script!

I am after a way of getting what is playing in mairlist to display on our station website… Could you point me please to the relevant script.

Many Thanks

P.s. does it give the option to set parameters such as 60secs - 400secs is a song, any more or less, ignore…?

It should be in the Script folder in your mAirList Installation direcotry.
But it is a very simple one, as far as I know there is no seperation of track length to decide if it is a song or not.

There is no “out of the box” solution, unfortunately. It actually depends on the way your web site works - is there an SQL server available? Or can you only upload files by FTP? etc.

For example, if there is some sort of SQL server running on your web server (for the CMS or whatever), you could create another table in the database and let mAirList write the log entries directly to that table through the database log interface.

Wow, didn’t know that was there. Very handy for future reference, thanks…

Torben, the website can only upload files by ftp as far as i am aware… Is it a case that a website should automatically update when the html file updates i.e. everytime a song begins?

Also, i am getting the following error when mairlist loads, now that i have selected it in the notification area of the config:

Error loading C:\Program Files\mAirList\scripts\notification\ [Error] (17:32): Type mismatch

Any ideas?


The “type mismatch” error probably comes from an outdated script that doesn’t match you program version. Perhaps you can post the script here, and we’ll have a look at it.

The script can only save the HTML file to your local hard disk. If you want to upload it via FTP, you need to call an FTP client with ShellExecute or ShellExecuteHidden. I believe there are some examples that can be found through forum search.

If you’re site is made with PHP, you can also write a text file first (without HTML headers and such) which is then processed by a PHP script on your website.

I admit that it this all sounds very complicated, and in fact, it can involve a fair amout of fiddling around. That’s because every website is different in terms of uploading and the technology used. For example:

  • My own websites (e.g. aren’t uploaded by FTP but checked out from a central Subversion repository.

  • At eldoradio, the web server is located in the same LAN as the studio, so the log files can just be transfered through a network drive. No FTP involved either.

Ok, thanks torben, things are becoming a little clearer now!

I was ok with setting up mairlist etc for on air use, the guys now want me to get it to do big IT things which is a tad beyond my knowledge - i am on a big learning curve!

Here is the script that i have in my notification folder

procedure OnPlayerStart(PlayerControl: IPlayerControl); var sl: TStringList; Item: IPlaylistItem; begin if not assigned(PlayerControl) then exit; Item := PlayerControl.GetItem; if assigned(Item) then begin sl := TStringList.Create; sl.Add(''); sl.Add('Now Playing'); sl.Add(''); sl.Add('

Artist: ' + Item.GetArtist + '
Title: ' + Item.GetTitle + '

'); sl.Add(''); sl.Add(''); sl.SaveToFile('c:\NowPlaying.html'); sl.Free; end; end;


I also tried the modified script here,4439.0.html to see if that made any difference and i get the same error!

You’ll be pleased to hear i have solved the issue… It was a minor over-sight on my behalf… all sorted now.

As always, many thanks for the quick responses!


Which mAirList version?

im currently running 3.0

How did you manage to solve the issue?