2008-10-17 20:23:33 +00:00
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.IO;
|
2008-11-28 22:20:17 +00:00
|
|
|
using CUETools.Processor;
|
2008-10-17 20:23:33 +00:00
|
|
|
|
|
|
|
|
namespace ArCueDotNet
|
|
|
|
|
{
|
|
|
|
|
class Program
|
|
|
|
|
{
|
|
|
|
|
static void Main(string[] args)
|
|
|
|
|
{
|
|
|
|
|
if (args.Length != 1)
|
|
|
|
|
{
|
|
|
|
|
Console.WriteLine("Usage: ArCueDotNet <filename>");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
string pathIn = args[0];
|
|
|
|
|
if (!File.Exists(pathIn))
|
|
|
|
|
{
|
|
|
|
|
Console.WriteLine("Input CUE Sheet not found.");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
CUEConfig config = new CUEConfig();
|
2008-10-26 11:25:14 +00:00
|
|
|
config.writeArLogOnVerify = false;
|
|
|
|
|
config.writeArTagsOnVerify = false;
|
2008-10-17 20:23:33 +00:00
|
|
|
config.autoCorrectFilenames = true;
|
|
|
|
|
StringWriter sw = new StringWriter();
|
|
|
|
|
try
|
|
|
|
|
{
|
2008-11-12 05:45:48 +00:00
|
|
|
CUESheet cueSheet = new CUESheet(config);
|
2009-03-22 16:59:05 +00:00
|
|
|
cueSheet.Action = CUEAction.Verify;
|
2009-05-01 15:16:26 +00:00
|
|
|
//cueSheet.OutputStyle = CUEStyle.SingleFile;
|
2008-12-09 07:25:48 +00:00
|
|
|
cueSheet.Open(pathIn);
|
2009-03-22 16:59:05 +00:00
|
|
|
cueSheet.Lookup();
|
2009-05-01 15:16:26 +00:00
|
|
|
cueSheet.GenerateFilenames(AudioEncoderType.NoAudio, "dummy", pathIn);
|
|
|
|
|
cueSheet.Go();
|
2008-10-17 20:23:33 +00:00
|
|
|
cueSheet.GenerateAccurateRipLog(sw);
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
Console.WriteLine("Error: " + ex.Message);
|
|
|
|
|
}
|
|
|
|
|
sw.Close();
|
|
|
|
|
Console.Write(sw.ToString());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|