LoadNextHour script

Hello,

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?

Thanks for the answer!
Vincent
RTV Borghende

To add the next playlist to the end of the current (known as “Append”), simply change the last bit of your script from “false” to “true”…

ie:

begin CurrentPlaylist.LoadFromFile('D:\jingles_radio\Sterrenwacht\radio\' + FormatDateTime('hh', now + 0.04166) + '.m3u', true); end

Hi Vincent, and welcome!

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

Hi Vincent, and welcome!

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.

Vincent

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

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

Vincent

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

BFN
CAD

[Error] (15:67): Unknown identifier 'LoadPlaylistFromFile'

Sorry, it’s “CreatePlaylistFromFile”.

Is it also possible to not only insert the playlist but also start playing it?
CurrentPlaybackControl.AutomationNext;

If you are not yet in AUTO mode, you also have to call first, as Cad explained:

CurrentPlaybackControl.SetAutomation(true);

Torben

Hi Torben, CAD and Charlie Davy,

It’s working great now (The playlist was already in AUTO mode, started at the startup of mAirList).

Thank you all for the support! I’m working on a workplan to implement mAirList in our radiostation soon for Selfsupport and radioautomation.

Kind regards,
Vincent Volmer
RTV Borghende