For loading the ‘next hour playlist’ i’m using the following script:
begin
CurrentPlaylist.LoadFromFile('D:\jingles_radio\Sterrenwacht\radio\' + FormatDateTime('hh', now + 0.04166) + '.m3u', false);
end.
This script removes the current playlist and replaces it with ‘the next hour’. Now I want to ‘insert’ the playlist instead of replacing it. How do I have to change this script?
For appending the new playlist at the end of the current one, simply replace “false” by “true” at the end of the line.
If you want to insert the new playlist before the current one, the solutions depends on the mAirList version you are using - is it v2.0 or v2.1?
Torben
Hello Torben,
I’m using the latest version 2.1.21
We’re planning to use mAirList in a couple of days/weeks at our radiostation (RTV Borgnhende). I really like this program because of the enormous possibilities. Now I understand the meaning of ‘true’ and ‘false’ but I really want to ‘insert’ the playlist after the current playing track (instead of appending).
mAirList loads the NextHourPlaylist at ##:58;00 and at ##:00;00 the ‘Top of the hour playlist’. I need the ‘TopOfTheHourPlaylist’ to be inserted into the current playlist (like I can do in the Event scheduler).
It would be very nice if this is possible with a script.
Try this script (not tested - I’m in a hurry right now):
begin
CurrentPlaylist.InsertPlaylist(CurrentPlaylist.GetHistoryCount, LoadPlaylistFromFile('D:\jingles_radio\Sterrenwacht\radio\' + FormatDateTime('hh', now + 0.04166) + '.m3u'));
end.
CurrentPlaylist.GetHistoryCount determines the number of items marked as played at the beginning of the playlist, so the new playlist is inserted right below them. You can also simply use 0 in order to insert the playlist at the very beginning.
Try this script (not tested - I'm in a hurry right now):
begin
CurrentPlaylist.InsertPlaylist(CurrentPlaylist.GetHistoryCount, LoadPlaylistFromFile('D:\jingles_radio\Sterrenwacht\radio\' + FormatDateTime('hh', now + 0.04166) + '.m3u'));
end.
CurrentPlaylist.GetHistoryCount determines the number of items marked as played at the beginning of the playlist, so the new playlist is inserted right below them. You can also simply use 0 in order to insert the playlist at the very beginning.
Torben
I,m sorry but it gives an error:
[Error] (15:67): Unknown identifier ‘LoadPlaylistFromFile’
Is it also possible to not only insert the playlist but also start playing it?
I know I ask a lot but I’ll learn delphi programming someday
Is it also possible to not only insert the playlist but also start playing it?
Is your Playlist not already in AUTO mode when the new set of tracks (playlist) is 'inserted?' If not, you can add a command to your script to start Automation, which you can do either before or after the 'insert' of the 'new hour' playlist, as you prefer.
(Sorry, I don’t know the AutomationStart command for V2.1.x because I use V2.0.x, and I think it changed in V2.1.x?)