hey there, i'm writing a script to organize my mp3s and tag them correctly, and i like my id3v2 tags to have a track number that's formatted like this: 05/16, or 08/16, etc., the last number being the total number of tracks on that album.
right now the script traverses sub-directories of a given directory, finds the mp3s, and adds them to a large list. then it goes through the list and opens the mp3s, removes all superfluous info, and re-tags them with lowercase tags.
so as far as i can tell, the only way to accurately get the total number of tracks on each album is to open all of the mp3 files first, create a database with hashes that conatin the artist, album, and a counter for the number of mp3s that have the same artst & album name.
then, after i have that, i can open each file yet again and write the completed tag with the total number of tracks in the track # field
right now the script traverses sub-directories of a given directory, finds the mp3s, and adds them to a large list. then it goes through the list and opens the mp3s, removes all superfluous info, and re-tags them with lowercase tags.
so as far as i can tell, the only way to accurately get the total number of tracks on each album is to open all of the mp3 files first, create a database with hashes that conatin the artist, album, and a counter for the number of mp3s that have the same artst & album name.
then, after i have that, i can open each file yet again and write the completed tag with the total number of tracks in the track # field