Close

The (few) shortcomings of CueTools

A project log for Music CD Ripper Robot

A CD Robot and PC combined, plus some custom software to capture my 25+ year CD Audio collection to the digital era.

h3liosphanh3liosphan 06/08/2015 at 13:470 Comments

CueTools.ConsoleRipper isn't perfect -

Not massive issues, but pretty inconvenient. Suffice it to say I did run into actual disks with these errors in - there may be other issues to come as I continue thru my library of disks.

Luckily the source code is available. However I've never had much luck getting things like this up and running in my dev environment (Visual Studio).

Much to my delight, save for a few dependency issues (I think), it loaded into VS. More to my delight, the entire ConsoleRipper component (plus it's specific dependencies included in the solution) compiled and linked! It even ran as expected!

ConsoleRipper is just a set of API calls strung together into the main() function! So I found the part of the code around which deals with the issues in hand, and added them in -

You can do the same by getting hold of the repository -

http://sourceforge.net/p/cuetoolsnet/code/ci/default/tree/

I'd say fetch the 2.1.6 version, then supplementing the code found here under the CueTools.Ripper.Console folder, program.cs -

foreach (var imeta in ctdb.Metadata)

{

meta = imeta;

break;

} //****************INSERT NEW CODE AT THIS SPOT -

//string destFile = (release == null) ? "cdimage.flac" : release.GetArtist() + " - " + release.GetTitle() + ".flac";

string destFile = (meta == null) ? "cdimage.wav" : meta.artist + " - " + meta.album + ".wav";

Console.WriteLine("Drive : {0}", audioSource.Path);

Console.WriteLine("Read offset : {0}", audioSource.DriveOffset);

Console.WriteLine("Read cmd : {0}", audioSource.CurrentReadCommand);

Console.WriteLine("Secure mode : {0}", audioSource.CorrectionQuality);

Console.WriteLine("Filename : {0}", destFile);

Console.WriteLine("Disk length : {0}", CDImageLayout.TimeToString(audioSource.TOC.AudioLength));

Console.WriteLine("AccurateRip : {0}", arVerify.ARStatus == null ? "ok" : arVerify.ARStatus);

Console.WriteLine("MusicBrainz : {0}", meta == null ? "not found" : meta.artist + " - " + meta.album);

With these extra lines -

[code]

As you can see, the majority of the fixup just makes sure the 'destfile' variable isn't an illegal filename.

I also subsitiuted the 'CDImage.wav' text with one adding a date and time.

Rather brilliantly, the info to tell whether the CD is part of a multi-disk set is already included in the code as part of the database lookup. There's literally 'meta.disccount' and 'meta.discnumber' variables, which I just mashed into the 'destfile' variable when it detects a disk count > 1.

I didn't build this up with the VS.Express edition, so I've no idea how you might fare with the freebie Visual Studio, but it should be a straightforward solution upgrade.

Don't worry too much about some compilation or link errors if you build the entire solution (with its tens of C# projects), provided you can open up the consoleripper project (within the overall solution) and just compile that bit, you're golden.

.

So now my additions can deal with a whole lot of crap thrown at it from the online disk database! And deal with it when the DB turns up nothing!

This has been a pretty win-win situation as it goes! I have so far ripped 89 individual disks amounting to over a thousand MP3 files!

Discussions