importing spotlogs into mAirlist playlist

Try to replace

fpi := Factory.CreateFilePlaylistItem(AUDIOPATH + audiofile + '.mp3', []);

by

fpi := Factory.CreateFilePlaylistItem(AUDIOPATH + audiofile + '.mp3', [fitDuration, fitAutoCue]);

This will calculate the duration and perform Auto Cue for the inserted item (but also slows down the script a bit as the file has to be scanned).

Thanks Torben.

I thought it might be something to do with CreateFilePlaylistItem but couldn’t find a list of allowed options.

Ron.

Search the CHM file for “TFileImportTasks”.

Found it thanks.

I think I need to get my head around the CHM file and what goes where :slight_smile:

The CHM file is generated automatically from the original source code, so the file and its structure is sometimes hard to understand for people who are not familiar with the source code (anyone else but me ;).

Hey! I resent that! ;D

However, my version of the CHM file here must be a few versions behind the latest one. I had to do a hex search in the mAirList.exe file to find out the correct parameter type (I kept getting “invalid type” for the third parameter in an InsertFile statement!). ::slight_smile:

BFN
Cad

Torben

50% there – I entered the [fitDuration, fitAutoCue] options and the autocue part works to strip out the silence but the duration of the item is still showing as blank until it is the ‘next’ item when it is displayed and the backtiming calculations update accordingly.

Bug?

Ron.


traffic.jpg

Do you see the duration when you add the item manually?

The file isn’t registered in any mAirListDB, is it? And there is no MMD file either?

The file might have a broken “header”. (Actually, MP3 files have no header at all, they only consist of a stream of frames each of which has its separate header, but it can happen that a file starts in the middle of a frame, so the first header, from which the duration is calculated, is not found at the very beginning of the file.)

The files are not in the database and do not have associated MMD files.

I am not sure what happens when entered manually - I will try that later and let you know!

If I drag the files across into the playlist manually then the duration of the audio is shown (although this is not a container which might make a difference)

Also - if I create a new mp3 file without any tags and rename that as ABREAK 1 then the duration of this file is not displayed when it is entered from the script.

Ron.

Update: If I use CreateFilePlaylistItem and replace the $traffic placemarkers with a single file (rather than a container holding a single file) then the time is inserted so the problem appears to lie with containers.