Get titles from mp3 filenames
Posted on 1999-12-07
I'm doing a ID3 mass editor, which works like this:
the user has an album (eg The Band's Finest), and wants to put an ID3 tag on all the files. This can take time, so i've made a mass editor for this. The program gets all filenames in the album directory, and stores them in a string array. the user types in all info, except the song title in the main screen. the user has the option to use "intelligent title generation", so that the titles for the id3 tags are generated automatically (since they are different for each song), but i'm not intelligent enough to get this to work.
Here's what i want it to do:
i want to 'extract' the title from the filenames. this can be done by checking the difference between two or more of the filenames, and seeing what characters are before and after the differences found, and then copy the difference (=the title) to a TitleArray, but how do i do this ?
another, IMPORTANT, thing: there are different formats for naming the mp3's. Most people use the "TrackNo Artist - Songname.mp3" format, but it may very well be different, and some elements might not even be there - some might be there many times!. Only sure thing is the extension. Also remember that some bands, or even songs begin with numbers, so isnumeric() won't do any good.
This has troubled me for a long time. please help. (if the question is not understood because of me being bad at explaining, i'll be happy to refine it)