Advanced ID3 tag inter-field processing

0

I have a bunch of MP3s with the same generic album "_misc". In the comment field, the files also have the real album name stored using the pattern album[REAL_ALBUM_NAME]. There may or may not be other text in the comment field before and after the album declaration.

I would like to automatically extract the real album name for each of these MP3s and place it in the album field (overwriting "_misc") using a batch/automated process. How can I do this? I can access the files with Windows, OS X, or Ubuntu (running as a live CD/DVD).

craigpatik

Posted 2012-10-30T11:37:13.047

Reputation: 177

1mp3tag's tag to filename function may do this, but this is a little trickier than any scenario I've done this with - IE, I need to test this before posting an answer. – Journeyman Geek – 2012-10-30T11:41:44.813

Answers

0

MP3Tag indeed does this. Use Tag -> Tag. Set the ALBUM field to $regexp(%comment%,album\[(.*)\],\1). (I haven't tested this, but it should work.)

Edit: Click Convert->Actions and set the type to Format Value. The regexp is $regexp(%comment%,'^.*album\[([^\]]+)\].*$',$1) – note the .* at the beginning and end of the expression to avoid matching other text in the comment field, and you use $1 to reference the match. (Source)

benshepherd

Posted 2012-10-30T11:37:13.047

Reputation: 1 448

Close! I made a slight correction. Thanks pointing me in the right direction. – craigpatik – 2012-10-30T21:00:56.293

Thanks for fixing it for me. I hadn't used the $regexp function before, but I do think MP3Tag is an excellent tool. – benshepherd – 2012-10-31T08:38:16.847