Auto Importer 'sub folders' (Or Upload API)


We organise our Library with a folder for every artist. I.E
D:\Library\Artist\Artist - Track 1.mp3

I don’t seem to be able to have the auto-importer ‘use’ this folder structure - If I put a folder in my watch-folder, it get’s ignore. If I put the audio straight into the watch folder, it gets imported not following the ‘folder for every artist’ structure we have.

Is there any way around this? Alternatively - Is there an upload API?


The DBImporter only handles flat directories at the moment, sorry.

But yes, you can use the DBServer API to upload files. I shall document that one day… Which version are you running?

Fantastic - An API would work much nicer for us!

I’m hoping I can specify a filepath, Title, Artist and cue-points? (If not, potentially do a normal upload, it returns some form of ID, then I add the cue-points and additional data after that).

We’re on 6.1.0 but can be on any newer verison :slight_smile:

Ok, let’s see…

Basically, you do a POST request to /api/v1/storages//files (with being the ID of the storage as displayed in the storage configuration, or can be requested with GET /api/v1/storages), and with multipart/form-data containing the following fields:

  • file: the actual binary file data
  • filename: the desired relative filename within the storage, can contain subfolders

And optionally:

  • folder: ID of the virtual folder to add the item to (displayed in window title in folder properties dialog in DB app, or GET /api/v1/folders)
  • item: JSON document with the item metadata (same format as in GET /api/v1/items/ - only set the fields you require)
  • replaceID: ID of an existing item to be replaced
  • overwritePolicy: what to do if a file with that name already exists, can be “Rename” (default), “Replace” or “Skip”

Return document will be the JSON of the created item. Its ID is indicated in the DatabaseID field. It can be altered by sending the modified document to PUT /api/v1/items/.

For authentication, create a new user in the DBServer app, and either use basic auth (with user/password), or create a new token in the user properties, and send it in an "Authorization: Bearer " header.

Torben - As always, your help is GREATLY appreciated! Worked first time, see screenshots below! :slight_smile:

Is there any way I can get it to carry out the additional ‘functions’ shown in the last screenshot attached?

Thanks again!!!

Screen Shot 2018-05-28 at 08.32.04.png

Screen Shot 2018-05-28 at 08.32.18.png

Screen Shot 2018-05-28 at 08.34.27.png

Nope, this is performed client-side.

How so? If using the ‘Auto Importer’ I can get these values added automatically?

Yes, the Auto Importer performs these tasks before posting the file+metadata to the server.

Thanks - Do you have any suggestions on performing these within the capabilities of mAirList? I.E Is there anything command line that already exists within mAirList to get this information of would I need to use external applications (Believe I can do this with ffmpeg etc but still… Worth asking! :))

I’m afraid not at this time.

No worries, thanks for the help with this!

Can you tell me how mAirList uses the normalisation values? Using FFMPEG I appear to be able to get True Peak & R128 Loudness but not ‘Peak’. Happy to stick those values in there if mAirList can still use them without ‘Peak’ :slight_smile:

Actually they are not really “used” at all at the moment. Other than the “Normalize” function in the item properties dialog.

There are plans to introduce automatic normalization based on these values in the future.