My script won’t run in mAirlist 4.1 it keeps asking me for an extra parameter for the InsertFile function.
ads.GetPlaylist.InsertFile(0, sOpener);
Is there something changed? Has anyone else the same problem?
My script won’t run in mAirlist 4.1 it keeps asking me for an extra parameter for the InsertFile function.
ads.GetPlaylist.InsertFile(0, sOpener);
Is there something changed? Has anyone else the same problem?
The third parameter is the set of “tasks” to perform while importing the file, e.g. reading MMDs, tags, performing auto cue etc. - see here: http://forum.mairlist.com/index.php/topic,5069.msg36288.html#msg36288
You can use the keyword AllFileImportTasks as a shortcut for all available methods:
CurrentPlaylist.InsertFile(0, 'somefile.mp3', AllFileImportTasks);
This is the default when inserting files through the mAirList GUI (drag&drop etc.).
After changing the code to:
ads.GetPlaylist.InsertFile(0, sOpener, AllFileImportTasks);
I get: Type Mismatch.
What am I doing wrong?
Hm, it seems that the scripting engine cannot handle set constants correctly. You have to specify the import tasks separately:
ads.GetPlaylist.InsertFile(0, sOpener, [fitMMD, fitTags, fitNativeTags, fitDuration, fitTilde, fitAutoCue, fitDatabaseLookup]);
You can leave out the methods that you don’t use.
I think I should rename the method to InsertFileEx and reintroduce the old InsertFile method without that third paremeter, for simplicity.