After a failed attempt at ripping my CD collection a few years ago, I recently tried again. This time, I've written about 1,500 lines of Python 3 code to make the job easier. These are scripts that analyze the tags across an album-worth of FLAC tracks, looking for errors that need correcting and renaming the files quickly when tags get changed. If you're interested, you can find them out at https://github.com/plucid/dBpa-scripts, along with a long README describing the scripts. Comments or suggestions welcome.
Using the Run External DSP, the error-checking script gets run automatically after each CD is ripped. That tells me what cleanup I need to do in mp3tag. Here's an example of the output after ripping a random CD, after introducing some intentional problems with the tags in CD Ripper first (like turning on the compilation flag) and omitting some of the tracks so there's something to see:
Here's the current list of tests performed:
There's also a script that duplicates the functionality of the Arrange Audio utility codec for Batch Converter, but it's lighter-weight since it's run from the command line, and it can move/copy all the files in an album folder, not just the track files and folder.jpg. I use it for renaming files and the album folder from within mp3tag, and for moving the cleaned-up files from my raw rip folders up to my NAS.
These scripts assume my current naming and tagging scheme, so they'll need tweaking for use elsewhere. But if you're comfortable in Python, that should be fairly easy. This was my first real Python project, and it went together remarkably quickly.
Using the Run External DSP, the error-checking script gets run automatically after each CD is ripped. That tells me what cleanup I need to do in mp3tag. Here's an example of the output after ripping a random CD, after introducing some intentional problems with the tags in CD Ripper first (like turning on the compilation flag) and omitting some of the tracks so there's something to see:
Code:
Renaming 'cuesheet.cue' to 'Cowboy Junkies - The Trinity Session.cue' Checking 'D:\CDRip\Cowboy Junkies\The Trinity Session (1988)' Missing Tracks: 7, 8, 11 Track 6 has duplicate value in tag 'composer': Margo Timmins, Michael Timmins, Michael Timmins Incompatible values for tags 'artist' and 'artist sort': Track 4: Tag 'artist sort' not found Incompatible values for tags 'composer' and 'composersort': Track 6: 'Margo Timmins; Michael Timmins; Michael Timmins' versus 'Timmins, Margo; Timmins, Michael' Track 12: 'Alan Block; Don Hecht' versus 'Block, Alan; Hecht, Donald' For this compilation, AlbumArtist should be 'Various Artists', not 'Cowboy Junkies' Processed 1 album, 1 disc, 9 tracks - 1 album with issues Press Enter when ready...
- Test if the DiscNumber or TrackNumber tags are missing or malformed, or if the same Disc/Track settings are found in multiple files.
- Test that the DiscTotal tag is identical across all files, and that all disc numbers from 1 to DiscTotal, and no others, are found in the FLAC files.
- For multi-disc albums, test that tags which should be identical across discs are so.
- Test non-FLAC files. Make sure the cover file folder.jpg exists, and that the cuesheet and extraction log files are present and have the expected names.
- Test if obsolete forms of certain tags are present. CD Ripper used to use the tags Organization, TotalDiscs, and TotalTracks instead of the current Label, DiscTotal, and TrackTotal.
- Test that the CD Ripper profile setting is Classical if and only if the Genre tag is also Classical.
- Test that AccurateRip was successful in all tracks.
- Test that tags which should be present in all tracks are so.
- Test that no unknown tags were found.
- Test that the only multivalued tags found were tags that permit multivalues (e.g. Artist or Soloists).
- Test that the TrackTotal tag is identical across all files for a single disc, and that all track numbers from 1 to TrackTotal, and no others, are found in the disc's FLAC files.
- Test that tags which should be identical across tracks of a single disc are so.
- Test that tags which should have unique values in each track are so.
- Test that multivalued tags don't repeat one of those values (e.g. an Artist tag of John Doe; John Doe).
- Test that the regular and sorted version of paired tags (e.g. Artist and Artist Sort) have the same values, ignoring ordering.
- Test if certain tags start with a leading 'The ', e.g. The Beatles should instead be Beatles, The.
- For non-classical CDs where the Artist tag varies across tracks, the AlbumArtist tag should either be found in the Artist tag, or the AlbumArtist should be Various Artists, Soundtrack, or TV Theme.
- If a disc is marked as a compilation (the Compilation tag exists), make sure the compilation status makes sense. For classical CDs, the 'Composer' tag should not be identical across tracks. If the Genre is Soundtrack, the AlbumArtist should be as well. Otherwise, the AlbumArtist should be either Various Artists or TV Theme.
- For classical discs, test that the Orchestra tag is present if it looks like it should, because either an artist's name includes something like 'Orchestra' or 'Symphony', or there's a Conductor tag.
There's also a script that duplicates the functionality of the Arrange Audio utility codec for Batch Converter, but it's lighter-weight since it's run from the command line, and it can move/copy all the files in an album folder, not just the track files and folder.jpg. I use it for renaming files and the album folder from within mp3tag, and for moving the cleaned-up files from my raw rip folders up to my NAS.
These scripts assume my current naming and tagging scheme, so they'll need tweaking for use elsewhere. But if you're comfortable in Python, that should be fairly easy. This was my first real Python project, and it went together remarkably quickly.
Comment