Hi, I copy all my CDs to my computer and listen to them there. I recently set up a media server to stream my audio files to various devices in my house, but the media server gets confused by the way I've tagged my multi-disc albums.
Using the Beatles' White Album for example, here's how I've been naming files:
A01 Back in the USSR.flac
A02 Dear Prudence.flac
...
A17 Julia.flac
B01 Birthday.flac
...
As you can see, I use "A" and B" to indicate which disc. The media server get confused by the non-numeric characters at the start of the filenames.
Users of that media server have recommended that I use mp3tag to set valid track numbers and disc numbers for all of the files.
So, here's what I want:
A01 Back in the USSR.flac -> disc 1, track 1
A02 Dear Prudence.flac -> disc 1, track 2
B01 Birthday.flac -> disc 2, track 1
My question is: is it possible for me to get mp3tag to do this?
I have thousands of files to re-tag, and plan to continue to copy CDs to my computer using my current filename scheme (A01, A02, etc. for multi-disc sets), so I would prefer to find a way to automate the tagging rather than doing it manually.
I'm a programmer, so I don't mind writing scripts. I just wanted to know if mp3tag has the flexibility to parse those "A01" type prefixes and add appropriate track and disc numbers.
Hi, I just downloaded mp3tag and tried that action. Unfortunately, it didn't work; it simply changed the Discnumber to -64.
I'm guessing that this is because the "source" script expects the "A01" to already be in the Track field, which is not the case. Currently "A01" is only present in the filename: "A01 Back in the USSR.flac".
How can the script be modified so that it extracts the first "word" of the filename, where by "word" I mean a block of characters separated by whitespace?
Okay, thanks. If I populate the Track field first, then the Action works.
However, there are 2 changes I would like to make to the Action:
If a song is in a single-CD set, the track numbers are simply numeric (01, 02, 03, 04, etc.) and as a result the Action sets the Discnumber to a negative number (-16 for tracks 01-09 and -15 for tracks 10-19). So, it looks like it's subtracting 64 from the ASCII value of the first character of the Track string ("0" or "1"). Ideally, the Action would either leave the Discnumber field blank for single-disc sets, or at least set the Disc number to "1". Is this possible?
Can we omit the leading 0s from track numbers?
Ideally, "B02 Birthday.flac" would get Discnumber "2" and Track "1"
...and "01 Come Together.flac" would get Discnumber "" or "1" and Track "1".
this is all different from your initial post.
And different preconditions require different solution.
You could filter for the ones that you want to treat:
%track% HAS A OR %track% HAS B
And for the others you can use
NOT %track% HAS A OR NOT %track% HAS B
and then enter the discnumber via the extended tags dialogue (ALt-T)