* New batch mode for command-line use

* Fixed extra null character sometimes appearing in .ape tags
* Played around with data track length bruteforce, concept proved, but not enabling it
* Data track diagnostics in accuraterip log
This commit is contained in:
chudov
2008-10-25 18:42:28 +00:00
parent 850eb4b5fb
commit 47534c491a
13 changed files with 1532 additions and 1664 deletions

View File

@@ -1,6 +1,8 @@
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using System.IO;
using System.Text;
namespace JDP {
static class Program {
@@ -9,13 +11,33 @@ namespace JDP {
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
if (args.Length == 2 && (args[0] == "/verify" || args[0] == "/convert" || args[0] == "/fix"))
if (args.Length > 1 && (args[0] == "/verify" || args[0] == "/convert" || args[0] == "/fix"))
{
frmBatch batch = new frmBatch();
batch.InputPath = args[1];
batch.AccurateRip = (args[0] != "/convert");
batch.AccurateOffset = (args[0] == "/fix");
Application.Run (batch);
if (args.Length == 2 && args[1][0] != '@')
batch.InputPath = args[1];
else for (int i = 1; i < args.Length; i++)
{
if (args[i][0] == '@')
{
string lineStr;
StreamReader sr;
try
{
sr = new StreamReader(args[i].Substring(1), Encoding.Default);
while ((lineStr = sr.ReadLine()) != null)
batch.AddInputPath(lineStr);
}
catch
{
batch.AddInputPath(args[i]);
}
} else
batch.AddInputPath(args[i]);
}
Application.Run(batch);
return;
}
frmCUETools form = new frmCUETools();