in reply to "Intelligent" ID3v2 Tagger

Hi,
I'm writing something to categorize MP3s, I was thinking of something to correctly "parse"(?) the MP3 into good metadata: If the file has ID3 tags it's good, I read those and use them, if not, I have to rely on parsing the filename, folder/filename, folder/folder/filename... etc.

Instead of assuming that the files are always /(title) - (artist)/, I was thinking of something like checking $1 and $2 against a list of the artists already in the db to see if there IS an artist with that name and mark that as a possible artist, if not, require input from the user, but there are obvious flaws in that. (different ways to type the artist name, typos, punctuations...etc)

Does anyone use a similar technique? or something to achieve the same results?


He who asks will be a fool for five minutes, but he who doesn't ask will remain a fool for life.

Chady | http://chady.net/

Replies are listed 'Best First'.
Re: Re: "Intelligent" ID3v2 Tagger
by barbie (Deacon) on Jul 21, 2003 at 17:52 UTC
    I have a similar problem regarding the naming convention, I have:

    /(artist)/(album)/(tracknum) - (title)

    What I thought might be better would be to have a templating string, then that could be used to extract the relevant fields. Thus using keywords, such as ARTIST, ALBUM, etc you should be able to extract the right field from the right portion of the path. So my template would look like:

    /ARTIST/ALBUM/TRACKNUM - TITLE

    I already do the extraction using File::Find::Rule (ain't it grand ... thanks Rich), but haven't gotten round to doing all the MP3 tagging. So I'll be having a jolly good play with this script once I'm back from YAPC::Europe.

    A fine effort.

    --
    Barbie | Birmingham Perl Mongers | http://birmingham.pm.org/

      Yeah, this script is by far no where near complete, but it works for me at the moment. I don't know if I plan on extending it for format strings, etc, but at least it provides somewhat of a base...

      Now that I think of it, it would also be nice to be able to exclude directories...hmmmmm