Using filename to create title (and artist?)

If a ‘new’ audio file doesn’t contain any tags, and has no associated mAirList info (like an MMD file for example), mAirList uses the entire filename as the track’s title.

Any reason why mAirList doesn’t (if the string ’ - ’ exists in the filename!) split a filename into artist and title? I think the filename format
- .
is quite a commonly-used one, so I think this would be a useful option to add to mAirList, unless I am missing or not seeing a good reason NOT to at least offer this as a Config option?

So for example, if you had a WAV file (a ‘vanilla’ one, not a BWF) with a filename in the above format, mAirList would split the artist and title automatically, instead of having to do this manually later.


As a config option: ok.

Hardcoded: No. I can think of too many useful filenames that contain the " - " substring, but not as an artist/title separator.

Cad, can you please propose a name for that new option?

I’d suggest this option should be added to Miscellaneous, File Import tab.

I think the easiest way to do this would be to allow a format string similar to the Title Update, Log Format string in Encoder, Metadata, but in reverse (if that makes sense?), plus a checkbox to switch the function on/off. This would allow you to correctly parse formats like
– .mp3 for example.

So altogether, you would ideally have a group box with the caption Import Artist/Title From Filename.
This would contain a checkbox captioned
Import artist/title from filename if no tags exist (default: clear/off);
and a textbox captioned
Format, with a default value of %b - %a (if I’ve got those the right way round! :D) meaning ‘artist - title’ in this case.


That’s the most comfortable way for the user, but not the easiest way to implement, actually: Parse the input string, look for the % bits, convert the string into a regular expression, try to match, and if it does, copy the matched substrings to the respective fields.

Not impossible, of course, but I would prefer to hardcode the one commonly used “artist - title” format for the moment.

OK, fair enough. The one hard-coded option would be fine.


Agreed. So what do you propose as a name for it?

I refer the honourable gentleman to the answer I gave some moments ago:

Import artist/title from filename if no tags exist


That was when we were discussing customizable file name formats. Don’t you think the name of the option should refer to the hardcoded format, as long as it’s hardcoded?

Well, you said yourself that artist - title.ext is a very common format for filenames, and I was trying to convey the meaning without a long, involved caption.

I suppose you could instead use:
Import artist/title from ‘artist -’ filename if no tags exist

But I still prefer the more concise original version that I suggested. Anyone needing further detail can consult the manual. :smiley:


Option will be added as of b887. It controls all hardcoded formats, in particular the new single dash format, and the existing double dash formats.