Files
cuetools.net/CUETools.Ripper.Console/Program.cs

335 lines
14 KiB
C#
Raw Normal View History

2008-11-26 18:57:40 +00:00
// ****************************************************************************
//
// CUERipper
Bump copyright year to 2020 The copyright year was last time updated in 2018. There is some cleanup involved in this commit and the next copyright year update is supposed to be simpler (i.e. substitute "-2020"). - Substitute occurrences of "-2018" with "-2020" using: git grep -I -l -e '-2018' -- ':(exclude)*.bak' | xargs \ sed -b -i -e 's/-2018/-2020/g' - Update special cases: CUEPlayer git grep -I -l -e 'Grigory Chudov 2010' -- | xargs \ sed -b -i -e 's/Grigory Chudov 2010/2010-2020 Grigory Chudov/g' CUERipper git grep -I -l -e '2008-2009' -- | xargs \ sed -b -i -e 's/2008-2009/2008-2020/g' CUETools, CUETools.FLACCL.cmd git grep -I -l -e '2008-2010' -- ':(exclude)*FlaCuda*' | xargs \ sed -b -i -e 's/2008-2010/2008-2020/g' git grep -I -l -e '2010-2013' -- | xargs \ sed -b -i -e 's/2010-2013/2010-2020/g' CUETools.ChaptersToCue git grep -I -l -e 'Grigory Chudov 2017' -- | xargs \ sed -b -i -e 's/Grigory Chudov 2017/2017-2020 Grigory Chudov/g' CUETools.CTDB.EACPlugin git grep -I -l -e 'Grigory Chudov 2012' -- | xargs \ sed -b -i -e 's/Grigory Chudov 2012/2012-2020 Grigory Chudov/g' git grep -I -l -e '2011-12' -- | xargs \ sed -b -i -e 's/2011-12/2011-2020/g' CUETools.Codecs.FLACCL git grep -I -l -e '2009-2010' -- ':(exclude)*FlaCuda*' | xargs \ sed -b -i -e 's/2009-2010/2009-2020/g' CUETools.eac3ui (BluTools) git grep -I -l -e '© 2018' -- | xargs \ sed -b -i -e 's/© 2018/© 2018-2020 Grigory Chudov/g' CUETools.Flake git grep -I -l -e ' 2009-2014 Gr' -- | xargs \ sed -b -i -e 's/ 2009-2014 Gr/ 2009-2020 Gr/g' CUETools.Processor git grep -I -l -e ' 2008-2013 Gr' -- | xargs \ sed -b -i -e 's/ 2008-2013 Gr/ 2008-2020 Gr/g' CUETools.Ripper.Console git grep -I -l -e ' 2008-10 Gr' -- | xargs \ sed -b -i -e 's/ 2008-10 Gr/ 2008-2020 Gr/g' CUETools.Ripper.Console, CUETools.Ripper.SCSI git grep -I -l -e ' 2008-13 Gr' -- | xargs \ sed -b -i -e 's/ 2008-13 Gr/ 2008-2020 Gr/g' Single year entries: 2008, 2009, 2010, 2011, 2017, 2018 git grep -I -l -e ' 2008 Gr' -- | xargs \ sed -b -i -e 's/ 2008 Gr/ 2008-2020 Gr/g' git grep -I -l -e ' 2009 Gr' -- ':(exclude)*FlaCuda*' | xargs \ sed -b -i -e 's/ 2009 Gr/ 2009-2020 Gr/g' git grep -I -l -e ' 2010 Gr' -- | xargs \ sed -b -i -e 's/ 2010 Gr/ 2010-2020 Gr/g' git grep -I -l -e ' 2011 Gr' -- | xargs \ sed -b -i -e 's/ 2011 Gr/ 2011-2020 Gr/g' git grep -I -l -e ' 2017 Gr' -- | xargs \ sed -b -i -e 's/ 2017 Gr/ 2017-2020 Gr/g' git grep -I -l -e ' 2018 Gr' -- | xargs \ sed -b -i -e 's/ 2018 Gr/ 2018-2020 Gr/g' Fix typo in copyright year of CUETools.Codecs.WMA/AudioDecoder.cs: Copyright (c) 20139 Grigory Chudov git grep -I -lw -e '20139' -- | xargs \ sed -b -i -e 's/20139/2013-2020/g'
2020-01-30 18:13:46 +01:00
// Copyright (C) 2008-2020 Grigory Chudov (gchudov@gmail.com)
2008-11-26 18:57:40 +00:00
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// ****************************************************************************
using System;
using System.IO;
2010-02-23 15:15:08 +00:00
using System.Net;
2008-11-26 18:57:40 +00:00
using System.Text;
using System.Collections.Generic;
2010-02-08 01:29:31 +00:00
using CUETools.Ripper;
2008-11-26 18:57:40 +00:00
using CUETools.Ripper.SCSI;
using CUETools.Codecs;
using CUETools.CDImage;
using CUETools.AccurateRip;
using CUETools.CTDB;
2008-11-26 18:57:40 +00:00
2008-12-07 23:59:48 +00:00
namespace CUETools.ConsoleRipper
2008-11-26 18:57:40 +00:00
{
2008-12-06 05:44:14 +00:00
class ProgressMeter
{
public DateTime realStart;
public ProgressMeter()
{
realStart = DateTime.Now;
//TimeSpan lastPrint = TimeSpan.FromMilliseconds(0);
}
public void ReadProgress(object sender, ReadProgressArgs e)
{
CDDriveReader audioSource = (CDDriveReader)sender;
int processed = e.Position - e.PassStart;
TimeSpan elapsed = DateTime.Now - e.PassTime;
double speed = elapsed.TotalSeconds > 0 ? processed / elapsed.TotalSeconds / 75 : 1.0;
TimeSpan totalElapsed = DateTime.Now - realStart;
2008-12-07 23:12:01 +00:00
TimeSpan totalEstimated = TimeSpan.FromMilliseconds(totalElapsed.TotalMilliseconds / Math.Max(1, (e.PassStart + (processed + e.Pass * (e.PassEnd - e.PassStart)) / (audioSource.CorrectionQuality + 1))) * audioSource.TOC.AudioLength);
2008-12-06 05:44:14 +00:00
// if ((elapsed - lastPrint).TotalMilliseconds > 60) ;
Console.Write("\r{9} : {0:00}%; {1:00.00}x; {2} ({10:0.00}%) errors; {3:d2}:{4:d2}:{5:d2}/{6:d2}:{7:d2}:{8:d2} ",
100.0 * e.Position / audioSource.TOC.AudioLength,
speed,
e.ErrorsCount,
totalElapsed.Hours, totalElapsed.Minutes, totalElapsed.Seconds,
totalEstimated.Hours, totalEstimated.Minutes, totalEstimated.Seconds,
e.Pass < 1 ? "Progress " : string.Format("Retry {0:00} ", e.Pass),
processed > 0 ? 100.0 * e.ErrorsCount / processed / (4 * 588) : 0
);
//lastPrint = elapsed;
}
}
2008-11-26 18:57:40 +00:00
class Program
{
2008-12-06 05:44:14 +00:00
static void Usage()
{
string drives = "";
char[] drivesAvailable = CDDrivesList.DrivesAvailable();
2008-12-06 05:44:14 +00:00
for (int i = 0; i < drivesAvailable.Length; i++)
drives += string.Format("{0}: ", drivesAvailable[i]);
Console.WriteLine("Usage : CUERipper.exe <options>");
Console.WriteLine();
2008-12-10 06:48:38 +00:00
Console.WriteLine("-S, --secure secure mode, read each block twice (default);");
Console.WriteLine("-B, --burst burst (1 pass) mode;");
2008-12-06 05:44:14 +00:00
Console.WriteLine("-P, --paranoid maximum level of error correction;");
Console.WriteLine("-D, --drive <letter> use a specific CD drive, e.g. {0};", drives);
Console.WriteLine("-O, --offset <samples> use specific drive read offset;");
2008-12-07 00:33:20 +00:00
Console.WriteLine("-T, --test detect read command;");
2008-12-10 06:48:38 +00:00
Console.WriteLine("--d8 force D8h read command;");
Console.WriteLine("--be force BEh read command;");
2008-12-06 05:44:14 +00:00
}
2008-11-26 18:57:40 +00:00
static void Main(string[] args)
{
Console.SetOut(Console.Error);
Bump copyright year to 2020 The copyright year was last time updated in 2018. There is some cleanup involved in this commit and the next copyright year update is supposed to be simpler (i.e. substitute "-2020"). - Substitute occurrences of "-2018" with "-2020" using: git grep -I -l -e '-2018' -- ':(exclude)*.bak' | xargs \ sed -b -i -e 's/-2018/-2020/g' - Update special cases: CUEPlayer git grep -I -l -e 'Grigory Chudov 2010' -- | xargs \ sed -b -i -e 's/Grigory Chudov 2010/2010-2020 Grigory Chudov/g' CUERipper git grep -I -l -e '2008-2009' -- | xargs \ sed -b -i -e 's/2008-2009/2008-2020/g' CUETools, CUETools.FLACCL.cmd git grep -I -l -e '2008-2010' -- ':(exclude)*FlaCuda*' | xargs \ sed -b -i -e 's/2008-2010/2008-2020/g' git grep -I -l -e '2010-2013' -- | xargs \ sed -b -i -e 's/2010-2013/2010-2020/g' CUETools.ChaptersToCue git grep -I -l -e 'Grigory Chudov 2017' -- | xargs \ sed -b -i -e 's/Grigory Chudov 2017/2017-2020 Grigory Chudov/g' CUETools.CTDB.EACPlugin git grep -I -l -e 'Grigory Chudov 2012' -- | xargs \ sed -b -i -e 's/Grigory Chudov 2012/2012-2020 Grigory Chudov/g' git grep -I -l -e '2011-12' -- | xargs \ sed -b -i -e 's/2011-12/2011-2020/g' CUETools.Codecs.FLACCL git grep -I -l -e '2009-2010' -- ':(exclude)*FlaCuda*' | xargs \ sed -b -i -e 's/2009-2010/2009-2020/g' CUETools.eac3ui (BluTools) git grep -I -l -e '© 2018' -- | xargs \ sed -b -i -e 's/© 2018/© 2018-2020 Grigory Chudov/g' CUETools.Flake git grep -I -l -e ' 2009-2014 Gr' -- | xargs \ sed -b -i -e 's/ 2009-2014 Gr/ 2009-2020 Gr/g' CUETools.Processor git grep -I -l -e ' 2008-2013 Gr' -- | xargs \ sed -b -i -e 's/ 2008-2013 Gr/ 2008-2020 Gr/g' CUETools.Ripper.Console git grep -I -l -e ' 2008-10 Gr' -- | xargs \ sed -b -i -e 's/ 2008-10 Gr/ 2008-2020 Gr/g' CUETools.Ripper.Console, CUETools.Ripper.SCSI git grep -I -l -e ' 2008-13 Gr' -- | xargs \ sed -b -i -e 's/ 2008-13 Gr/ 2008-2020 Gr/g' Single year entries: 2008, 2009, 2010, 2011, 2017, 2018 git grep -I -l -e ' 2008 Gr' -- | xargs \ sed -b -i -e 's/ 2008 Gr/ 2008-2020 Gr/g' git grep -I -l -e ' 2009 Gr' -- ':(exclude)*FlaCuda*' | xargs \ sed -b -i -e 's/ 2009 Gr/ 2009-2020 Gr/g' git grep -I -l -e ' 2010 Gr' -- | xargs \ sed -b -i -e 's/ 2010 Gr/ 2010-2020 Gr/g' git grep -I -l -e ' 2011 Gr' -- | xargs \ sed -b -i -e 's/ 2011 Gr/ 2011-2020 Gr/g' git grep -I -l -e ' 2017 Gr' -- | xargs \ sed -b -i -e 's/ 2017 Gr/ 2017-2020 Gr/g' git grep -I -l -e ' 2018 Gr' -- | xargs \ sed -b -i -e 's/ 2018 Gr/ 2018-2020 Gr/g' Fix typo in copyright year of CUETools.Codecs.WMA/AudioDecoder.cs: Copyright (c) 20139 Grigory Chudov git grep -I -lw -e '20139' -- | xargs \ sed -b -i -e 's/20139/2013-2020/g'
2020-01-30 18:13:46 +01:00
Console.WriteLine("CUERipper v2.1.7 Copyright (C) 2008-2020 Grigory Chudov");
2008-11-26 18:57:40 +00:00
Console.WriteLine("This is free software under the GNU GPLv3+ license; There is NO WARRANTY, to");
Console.WriteLine("the extent permitted by law. <http://www.gnu.org/licenses/> for details.");
2008-12-01 21:54:55 +00:00
2008-12-06 05:44:14 +00:00
int correctionQuality = 1;
string driveLetter = null;
int driveOffset = 0;
2008-12-07 00:33:20 +00:00
bool test = false;
bool forceD8 = false, forceBE = false, quiet = false;
2008-12-06 05:44:14 +00:00
for (int arg = 0; arg < args.Length; arg++)
{
bool ok = true;
if (args[arg] == "-P" || args[arg] == "--paranoid")
correctionQuality = 2;
2008-12-10 06:48:38 +00:00
else if (args[arg] == "-S" || args[arg] == "--secure")
correctionQuality = 1;
else if (args[arg] == "-B" || args[arg] == "--burst")
correctionQuality = 0;
else if (args[arg] == "-T" || args[arg] == "--test")
2008-12-07 00:33:20 +00:00
test = true;
2008-12-10 06:48:38 +00:00
else if (args[arg] == "--d8")
forceD8 = true;
else if (args[arg] == "--be")
forceBE = true;
else if (args[arg] == "-Q" || args[arg] == "--quiet")
quiet = true;
2008-12-06 05:44:14 +00:00
else if ((args[arg] == "-D" || args[arg] == "--drive") && ++arg < args.Length)
driveLetter = args[arg];
else if ((args[arg] == "-O" || args[arg] == "--offset") && ++arg < args.Length)
ok = int.TryParse(args[arg], out driveOffset);
else
ok = false;
if (!ok)
{
Usage();
return;
}
}
char[] drives;
if (driveLetter == null || driveLetter.Length < 1)
{
drives = CDDrivesList.DrivesAvailable();
2008-12-06 05:44:14 +00:00
if (drives.Length < 1)
{
Console.WriteLine("No CD drives found.");
return;
}
}
else
{
2008-12-06 05:44:14 +00:00
drives = new char[1];
drives[0] = driveLetter[0];
}
2008-12-06 05:44:14 +00:00
2008-11-26 18:57:40 +00:00
#if !DEBUG
try
#endif
{
CDDriveReader audioSource = new CDDriveReader();
2008-12-06 05:44:14 +00:00
audioSource.Open(drives[0]);
if (audioSource.TOC.AudioTracks < 1)
{
Console.WriteLine("{0}: CD does not contain any audio tracks.", audioSource.Path);
audioSource.Close();
return;
}
if (driveOffset == 0)
if (!AccurateRipVerify.FindDriveReadOffset(audioSource.ARName, out driveOffset))
Console.WriteLine("Unknown read offset for drive {0}!!!", audioSource.Path);
//throw new Exception("Failed to find drive read offset for drive" + audioSource.ARName);
2008-12-10 06:48:38 +00:00
audioSource.DriveOffset = driveOffset;
audioSource.CorrectionQuality = correctionQuality;
audioSource.DebugMessages = !quiet;
2008-12-10 06:48:38 +00:00
if (forceD8) audioSource.ForceD8 = true;
if (forceBE) audioSource.ForceBE = true;
string readCmd = audioSource.AutoDetectReadCommand;
2008-12-07 00:33:20 +00:00
if (test)
{
2008-12-10 06:48:38 +00:00
Console.Write(readCmd);
2008-12-07 00:33:20 +00:00
return;
}
2010-02-23 15:15:08 +00:00
AccurateRipVerify arVerify = new AccurateRipVerify(audioSource.TOC, WebRequest.GetSystemWebProxy());
2010-02-06 23:17:07 +00:00
AudioBuffer buff = new AudioBuffer(audioSource, 0x10000);
string CDDBId = AccurateRipVerify.CalculateCDDBId(audioSource.TOC);
string ArId = AccurateRipVerify.CalculateAccurateRipId(audioSource.TOC);
var ctdb = new CUEToolsDB(audioSource.TOC, null);
ctdb.Init(arVerify);
2018-03-11 19:17:57 -04:00
ctdb.ContactDB(null, "CUETools.ConsoleRipper 2.1.7", audioSource.ARName, true, false, CTDBMetadataSearch.Fast);
arVerify.ContactAccurateRip(ArId);
CTDBResponseMeta meta = null;
foreach (var imeta in ctdb.Metadata)
2008-11-30 03:04:05 +00:00
{
meta = imeta;
break;
2008-11-30 03:04:05 +00:00
}
2008-12-06 05:44:14 +00:00
//string destFile = (release == null) ? "cdimage.flac" : release.GetArtist() + " - " + release.GetTitle() + ".flac";
string destFile = (meta == null) ? "cdimage.wav" : string.Join("_", (meta.artist + " - " + meta.album).Split(Path.GetInvalidFileNameChars())) + ".wav";
2008-11-30 03:04:05 +00:00
Console.WriteLine("Drive : {0}", audioSource.Path);
2008-12-01 21:54:55 +00:00
Console.WriteLine("Read offset : {0}", audioSource.DriveOffset);
2008-12-10 06:48:38 +00:00
Console.WriteLine("Read cmd : {0}", audioSource.CurrentReadCommand);
2008-12-07 23:12:01 +00:00
Console.WriteLine("Secure mode : {0}", audioSource.CorrectionQuality);
2008-11-30 03:04:05 +00:00
Console.WriteLine("Filename : {0}", destFile);
2008-12-01 20:24:16 +00:00
Console.WriteLine("Disk length : {0}", CDImageLayout.TimeToString(audioSource.TOC.AudioLength));
2008-11-30 03:04:05 +00:00
Console.WriteLine("AccurateRip : {0}", arVerify.ARStatus == null ? "ok" : arVerify.ARStatus);
Console.WriteLine("MusicBrainz : {0}", meta == null ? "not found" : meta.artist + " - " + meta.album);
2008-11-30 03:04:05 +00:00
2008-12-06 05:44:14 +00:00
ProgressMeter meter = new ProgressMeter();
audioSource.ReadProgress += new EventHandler<ReadProgressArgs>(meter.ReadProgress);
2008-11-26 18:57:40 +00:00
audioSource.DetectGaps();
StringWriter cueWriter = new StringWriter();
cueWriter.WriteLine("REM DISCID {0}", CDDBId);
cueWriter.WriteLine("REM ACCURATERIPID {0}", ArId);
cueWriter.WriteLine("REM COMMENT \"{0}\"", audioSource.RipperVersion);
if (meta != null && meta.year != "")
cueWriter.WriteLine("REM DATE {0}", meta.year);
if (audioSource.TOC.Barcode != null)
cueWriter.WriteLine("CATALOG {0}", audioSource.TOC.Barcode);
if (meta != null)
{
cueWriter.WriteLine("PERFORMER \"{0}\"", meta.artist);
cueWriter.WriteLine("TITLE \"{0}\"", meta.album);
}
cueWriter.WriteLine("FILE \"{0}\" WAVE", destFile);
for (int track = 1; track <= audioSource.TOC.TrackCount; track++)
if (audioSource.TOC[track].IsAudio)
{
cueWriter.WriteLine(" TRACK {0:00} AUDIO", audioSource.TOC[track].Number);
if (meta != null && meta.track.Length >= audioSource.TOC[track].Number)
{
cueWriter.WriteLine(" TITLE \"{0}\"", meta.track[(int)audioSource.TOC[track].Number - 1].name);
cueWriter.WriteLine(" PERFORMER \"{0}\"", meta.track[(int)audioSource.TOC[track].Number - 1].artist);
}
if (audioSource.TOC[track].ISRC != null)
cueWriter.WriteLine(" ISRC {0}", audioSource.TOC[track].ISRC);
if (audioSource.TOC[track].DCP || audioSource.TOC[track].PreEmphasis)
cueWriter.WriteLine(" FLAGS{0}{1}", audioSource.TOC[track].PreEmphasis ? " PRE" : "", audioSource.TOC[track].DCP ? " DCP" : "");
for (int index = audioSource.TOC[track].Pregap > 0 ? 0 : 1; index <= audioSource.TOC[track].LastIndex; index++)
cueWriter.WriteLine(" INDEX {0:00} {1}", index, audioSource.TOC[track][index].MSF);
}
cueWriter.Close();
StreamWriter cueFile = new StreamWriter(Path.ChangeExtension(destFile, ".cue"));
cueFile.Write(cueWriter.ToString());
cueFile.Close();
//IAudioDest audioDest = new FLACWriter(destFile, audioSource.BitsPerSample, audioSource.ChannelCount, audioSource.SampleRate);
IAudioDest audioDest = new Codecs.WAV.AudioEncoder(new Codecs.WAV.EncoderSettings(audioSource.PCM), destFile);
audioDest.FinalSampleCount = audioSource.Length;
2010-02-06 23:17:07 +00:00
while (audioSource.Read(buff, -1) != 0)
2008-11-26 18:57:40 +00:00
{
2010-02-06 23:17:07 +00:00
arVerify.Write(buff);
audioDest.Write(buff);
}
2008-11-26 18:57:40 +00:00
2008-12-06 05:44:14 +00:00
TimeSpan totalElapsed = DateTime.Now - meter.realStart;
Console.Write("\r \r");
Console.WriteLine("Results : {0:0.00}x; {1:d5} errors; {2:d2}:{3:d2}:{4:d2}",
2010-02-06 23:17:07 +00:00
audioSource.Length / totalElapsed.TotalSeconds / audioSource.PCM.SampleRate,
audioSource.FailedSectors.PopulationCount(),
2008-12-06 05:44:14 +00:00
totalElapsed.Hours, totalElapsed.Minutes, totalElapsed.Seconds
2008-11-26 18:57:40 +00:00
);
audioDest.Close();
2008-11-30 23:47:13 +00:00
StringWriter logWriter = new StringWriter();
2010-02-08 01:29:31 +00:00
logWriter.WriteLine("{0}", audioSource.RipperVersion);
logWriter.WriteLine("Extraction logfile from {0}", DateTime.Now);
logWriter.WriteLine("Used drive : {0}", audioSource.Path);
logWriter.WriteLine("Read offset correction : {0}", audioSource.DriveOffset);
2008-12-06 05:44:14 +00:00
bool wereErrors = false;
for (int iTrack = 1; iTrack <= audioSource.TOC.AudioTracks; iTrack++)
for (uint iSector = audioSource.TOC[iTrack].Start; iSector <= audioSource.TOC[iTrack].End; iSector ++)
if (audioSource.FailedSectors[(int)iSector])
2008-12-06 05:44:14 +00:00
{
if (!wereErrors)
{
logWriter.WriteLine();
logWriter.WriteLine("Errors detected");
logWriter.WriteLine();
}
wereErrors = true;
logWriter.WriteLine("Track {0} contains errors", iTrack);
break;
}
logWriter.WriteLine();
logWriter.WriteLine("TOC of the extracted CD");
logWriter.WriteLine();
logWriter.WriteLine(" Track | Start | Length | Start sector | End sector");
logWriter.WriteLine(" ---------------------------------------------------------");
for (int track = 1; track <= audioSource.TOC.TrackCount; track++)
logWriter.WriteLine("{0,9} | {1,8} | {2,8} | {3,9} | {4,9}",
audioSource.TOC[track].Number,
audioSource.TOC[track].StartMSF,
audioSource.TOC[track].LengthMSF,
audioSource.TOC[track].Start,
audioSource.TOC[track].End);
logWriter.WriteLine();
logWriter.WriteLine("AccurateRip summary");
logWriter.WriteLine();
2010-05-18 17:18:37 +00:00
arVerify.GenerateFullLog(logWriter, true, ArId);
logWriter.WriteLine();
logWriter.WriteLine("End of status report");
2008-11-30 23:47:13 +00:00
logWriter.Close();
StreamWriter logFile = new StreamWriter(Path.ChangeExtension(destFile, ".log"));
logFile.Write(logWriter.ToString());
logFile.Close();
2008-11-26 18:57:40 +00:00
audioSource.Close();
2008-11-30 23:47:13 +00:00
2008-12-06 05:44:14 +00:00
//FLACReader tagger = new FLACReader(destFile, null);
//tagger.Tags.Add("CUESHEET", cueWriter.ToString());
//tagger.Tags.Add("LOG", logWriter.ToString());
//tagger.UpdateTags(false);
2008-11-26 18:57:40 +00:00
}
#if !DEBUG
catch (Exception ex)
{
Console.WriteLine();
Console.WriteLine("Error: {0}", ex.Message);
Console.WriteLine("{0}", ex.StackTrace);
}
#endif
}
2008-12-06 05:44:14 +00:00
//private void MusicBrainz_LookupProgress(object sender, XmlRequestEventArgs e)
//{
// if (this.CUEToolsProgress == null)
// return;
// _progress.percentDisk = (1.0 + _progress.percentDisk) / 2;
// _progress.percentTrack = 0;
// _progress.input = e.Uri.ToString();
// _progress.output = null;
// _progress.status = "Looking up album via MusicBrainz";
// this.CUEToolsProgress(this, _progress);
//}
2008-11-26 18:57:40 +00:00
}
}