AutoFTP - nice util for uploading song info

Found this neat AutoFTP program that is very simple and seems to work very well with mAirList “now playing” scripts:

http://www.glenn.delahoy.com/software/files/file_info/download.php?file=AutoFtp204.zip

You can program it to “watch” a folder for file changes, then it FTPs the contects to your website.

Here’s a script that I run at the top of the playlist to create a “DJ” onair:

var sl: TStringList; begin sl := TStringList.Create; sl.Add('<b>Charlie</b> is on-air and now playing:'); sl.SaveToFile('D:\nowplaying\onair.php'); sl.Free; end.

…and here’s the song info:

procedure OnPlayerStart(PlayerControl: IPlayerControl; Item: IPlaylistItem);
var sl: TStringList;
begin
  sl := TStringList.Create;
  sl.Add(Item.GetArtist + ' - ' + Item.GetTitle);
  sl.SaveToFile('D:\nowplaying\nowplaying.php');
  sl.Free;
end;

begin
end.

Using PHPInclude, you can display both those PHP files wherever you need to. For example, if you have a common title/menu-bar on your website - simply add the PHPInclude code and show the current DJ/Song on every webpage.

Been tinkering again with my scripts… I now have the following script (or variations of) running at the top of a playlist (or Rotation, in StationPlaylist) - they are also available via the Actions button - or pulled from a “Playlist” view off the Browser.

On Air - Charlie.mls

[code]var sl: TStringList;
begin
sl := TStringList.Create;
sl.Add(’’);
sl.SaveToFile(‘D:\nowplaying\imagename.php’);
sl.Free;

sl := TStringList.Create;
sl.Add(‘mAirList with Charlie’);
sl.SaveToFile(‘D:\nowplaying\showname.php’);
sl.Free;

SystemLog(‘OnAir - Charlie… done!’);

end.[/code]

This would be the M3U format to load it:

#mAirList COMMAND [OnAir - Charlie] RUNSCRIPT D:\mAirList Files\Profiles and Scripts\OnAir - Charlie.mls

Displaying these on your website (using PHP) is really simple:

<?php include("http://www.website.co.uk/imagename.php"); ?>

and

<?php include("http://www.website.co.uk/showname.php"); ?>

These would suit any station/user who has StationPlaylist or is able to schedule text break-notes (dummys) in-between audio items. The AutoFTP software is a really useful tool, and works well with this dynamic PHP files.

Here’s a look at my test page:

and by putting the showname PHPInclude in-between the ListenLive link, you can change that with each show/DJ :wink:

I’ve also wrote a really simple program that allows a DJ to enter their own text + image and create those 2 PHP files manually. This would work on ANY system - I’ll post a download to that once I’ve made it configurable, as it currently only works on my web-server ;(

Hi Charlie,

Old topic i realise, but nevertheless, perfect for what I need to do!

Would it be possible though for you to integrate your ‘Intelligent Now Playing Script’ (http://forum.mairlist.com/index.php/topic,2554.0.html) into this simple one (so it can omit idents, beds, etc)?

This would be great. The reason I am not using the Intelligent script solely, is due to the fact we use Icecast servers and not ShoutCast…also, this one is a lot easier and practical for the way we will be doing things!

Thanks, Ryan.

Ryan,
I’m not familiar with Icecast servers - presumably you can alter the “now playing” field via a URL string as per SHOUTcast ? The above example is a cut-out of the Intelligent Now Playing Script - you just alter the filename and format to suit what you want.

Ah right, i never realised ti was a cut-out of the larger script! I see now.

Not to worry!

I’ll use the Intelligent Script then. The only thing i need changing is the remval of teh HTTP syncing, as it’s not needed in the way we will be using it. All we need is to save the updated file, and then use this AutoFTP to upload it.

Thanks, Ryan.

Cool - just put // before any lines you want to comment-out (you’ll see from my notes within the script how it’s done)…

Make sure you get the latest version as I’ve just re-posted the script to include a “Production Mode” setting - so in a multi-studio environment, if you’re playing music from the main Playlist/Players - the details are not sent to your website/stream :wink:

Thanks for your help Charlie!

One thing which i have never known is to do the “on air status” in mAirList (to make use of the new production mode you have implemented).

Would you be able to help?

Thanks.

It’s quite simple - in GUI (in Config), just add an OnAirSwitch :wink:

To alter it’s features, place this in your skin.ini file… Remember to alter the object number if the switch is not 0 :wink:

[ScreenObject0] OnAirFontName=Lucida Console OffAirFontName=Lucida Console OnAirFontSize=24 OffAirFontSize=24 OnAirFontStyle=1 OffAirFontStyle=1 OnAirFontStyle=1 OnAirFontColor=#FF0000 OffAirFontColor=#FFFFFF OnAirBackgroundColor=#000000 OffAirBackgroundColor=#000000 OnAirCaption=On-Air OffAirCaption=Production

Ah brilliant!

Sorted :wink:

Thanks!

Just thinking Charlie…

As the script only detects a change in state of a player before updating, it means that if we open the mics after a song, the status will be showing the song playing for that entire link while nothing plays in mAirList (or also if we are playing CDs). So the status will not update until something new is played, which would be after a link. Is it possible that when in On Air Mode to detect, for example, 30 seconds of silence and then update with whatever e.g. “more music soon”?

Hope that makes sense.

Thanks, Ryan.

Charlie: Perhaps Ryan has not fully grasped that the finished script needs to be a Notification script with the relevant ‘bits’ in the OnPlayerStart (now playing) and OnPlayerStop (not playing) sections.

That is how it works, yes? I’ve only quickly skimmed through the scripts! ;D

BFN
CAD

I haven’t quite grasped it fully yet Cad :wink:

When testing it out at home, it doesn’t seem to update when there is ‘nothing playing’…Should it?

I have it as a Notification Script and have also implemented the On Air/Production Mode.

Thanks, Ryan.

My script responds to an OnPlayerStart event, so it’ll only change when a Player (not a Cartwall) is started. It’s up to you what you tell it to do within each of the 4 parameters: OnAirSwitch, No Logging, Advert, Song, Pre-rec. You could put an OnPlayerStop section in there but that’ll fire everytime a player finishes - I’m guessing that’ll be Global Fade Duration seconds AFTER the next song has started - less than ideal :wink:

I see wha you mean by the OnPlayerStop event, because even though an ident would play over the back end of a song, as soon as the songfinishes, the OnPlayerStop event would fire. Hmmm…

And also, we don’t want the cartwall being logged, so that’s fine!

What would the GlobalFadeDuration do…is there a way to detect silence on the players?

Thanks, Ryan.

What I meant with the GlobalFadeDuration is that when a song finishes, the FadeOut marker will start the next item, that new item will be logged, but the outgoing song will “stop” after your GlobalFadeDuration (which is usually 2-3 secs)…

Here’s an example with some times to help illustrate my point:

@ 00:00, sends “Playing: Green Day - American Idiot”
@ 03:30, sends “Playing: Blur - Parklife”
@ 03:32, sends “More music soon…” edit: this is when Green Day’s player has stopped

In that example, we assume that American Idiot is 3:30 long and the GlobalFade is set to 2000(ms). When Blur starts, Green Day is still fading-out, and the Player is not “stopped” until the fade-out has been accomplished.

There is a timer function in the scripting interface, but I’ve never done anything with it.

Would that mean the next item would play though? Seems a bit odd…

If there isn’t any way to detect silence then no worries :wink:

Thanks, Ryan.

I’ve never been too worried about leaving song details showing - I suppose it depends upon your format :slight_smile: You could add an OnOnAirOff event so that if you do “switch off mAirList” it sends something to the server.

If you wanted to be really clever, you could wire your mixer’s “on air tally” to a joystick input and make it fire a script to say “More music soon” because the DJ is talking :wink:

Suppose it’s not too much trouble showing it…

And yes that would be a fancy way of doing things!

We do have a spare jack to do what you suggested…how would i go about it detecting it though via a script? Hardware side of things we are fine…

Thanks, Ryan.

You need to make this circuit in order for Windows to “see” a joystick. A USB-Game convertor should work if you do not have an old-fashioned 15-way joystick connector. Add a Joystick to Remote in mAirListConfig - and use RUNSCRIPT to make it fire the script.