mirror of
https://github.com/claunia/cuetools.net.git
synced 2025-12-16 18:14:25 +00:00
Minor bugfixes (2.0.4a)
This commit is contained in:
@@ -156,6 +156,6 @@ hdcd.dll (c) Christopher Key
|
||||
<value>439, 296</value>
|
||||
</data>
|
||||
<data name="$this.Text" xml:space="preserve">
|
||||
<value>CUETools v1.9.5: О программе</value>
|
||||
<value>CUETools: О программе</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -114,17 +114,28 @@ namespace JDP
|
||||
|
||||
pathIn = Path.GetFullPath(pathIn);
|
||||
|
||||
textBox1.Text += "Processing " + pathIn + ":\r\n";
|
||||
textBox1.Select(0, 0);
|
||||
this.Invoke((MethodInvoker)delegate()
|
||||
{
|
||||
textBox1.Text += "Processing " + pathIn + ":\r\n";
|
||||
textBox1.Select(0, 0);
|
||||
});
|
||||
|
||||
if (!File.Exists(pathIn) && !Directory.Exists(pathIn))
|
||||
throw new Exception("Input CUE Sheet not found.");
|
||||
|
||||
if (_profile._action == CUEAction.CorrectFilenames)
|
||||
throw new Exception("CorrectFilenames action not yet supported in commandline mode.");
|
||||
if (_profile._action == CUEAction.CreateDummyCUE)
|
||||
throw new Exception("CreateDummyCUE action not yet supported in commandline mode.");
|
||||
|
||||
bool useAR = _profile._action == CUEAction.Verify || _profile._useAccurateRip;
|
||||
|
||||
cueSheet.Action = _profile._action;
|
||||
cueSheet.OutputStyle = _profile._CUEStyle;
|
||||
cueSheet.WriteOffset = _profile._writeOffset;
|
||||
cueSheet.Open(pathIn);
|
||||
cueSheet.Lookup();
|
||||
if (useAR)
|
||||
cueSheet.UseAccurateRip();
|
||||
|
||||
pathOut = CUESheet.GenerateUniqueOutputPath(_config,
|
||||
_profile._outputTemplate,
|
||||
@@ -137,10 +148,8 @@ namespace JDP
|
||||
throw new Exception("Could not generate output path.");
|
||||
|
||||
cueSheet.GenerateFilenames(_profile._outputAudioType, _profile._outputAudioFormat, pathOut);
|
||||
if (_profile._action != CUEAction.Verify && _profile._CUEStyle == CUEStyle.SingleFileWithCUE)
|
||||
cueSheet.SingleFilename = Path.ChangeExtension(Path.GetFileName(pathOut), "." + _profile._outputAudioFormat);
|
||||
|
||||
cueSheet.UsePregapForFirstTrackInSingleFile = false;
|
||||
|
||||
if (script == null)
|
||||
cueSheet.Go();
|
||||
else
|
||||
@@ -158,7 +167,7 @@ namespace JDP
|
||||
textBox1.Text += cueSheet.LOGContents;
|
||||
textBox1.Show();
|
||||
}
|
||||
else if (cueSheet.Action != CUEAction.Convert)
|
||||
else if (useAR)
|
||||
{
|
||||
StringWriter sw = new StringWriter();
|
||||
cueSheet.GenerateAccurateRipLog(sw);
|
||||
|
||||
3
CUETools/frmCUETools.Designer.cs
generated
3
CUETools/frmCUETools.Designer.cs
generated
@@ -629,15 +629,18 @@ namespace JDP {
|
||||
// toolStripOutput
|
||||
//
|
||||
resources.ApplyResources(this.toolStripOutput, "toolStripOutput");
|
||||
this.toolStripOutput.GripMargin = new System.Windows.Forms.Padding(0);
|
||||
this.toolStripOutput.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
|
||||
this.toolStripOutput.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.toolStripLabelOutput,
|
||||
this.toolStripSplitButtonOutputBrowser});
|
||||
this.toolStripOutput.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.HorizontalStackWithOverflow;
|
||||
this.toolStripOutput.Name = "toolStripOutput";
|
||||
this.toolStripOutput.RenderMode = System.Windows.Forms.ToolStripRenderMode.System;
|
||||
//
|
||||
// toolStripLabelOutput
|
||||
//
|
||||
this.toolStripLabelOutput.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.toolStripLabelOutput.Name = "toolStripLabelOutput";
|
||||
resources.ApplyResources(this.toolStripLabelOutput, "toolStripLabelOutput");
|
||||
//
|
||||
|
||||
@@ -256,26 +256,6 @@ namespace JDP {
|
||||
if (_reducePriority)
|
||||
Process.GetCurrentProcess().PriorityClass = System.Diagnostics.ProcessPriorityClass.Idle;
|
||||
|
||||
//fileSystemTreeView1.CheckBoxes = FileBrowserState == FileBrowserStateEnum.Checkboxes;
|
||||
//fileSystemTreeView1.IconManager = m_icon_mgr;
|
||||
//if (InputPath != "")
|
||||
//{
|
||||
// TreeNode node = null;
|
||||
// try
|
||||
// {
|
||||
// node = fileSystemTreeView1.LookupNode(InputPath) ??
|
||||
// fileSystemTreeView1.LookupNode(Path.GetDirectoryName(InputPath));
|
||||
// }
|
||||
// catch
|
||||
// {
|
||||
// }
|
||||
// if (node != null)
|
||||
// {
|
||||
// fileSystemTreeView1.SelectedNode = node;
|
||||
// node.Expand();
|
||||
// }
|
||||
//}
|
||||
|
||||
motdImage = null;
|
||||
if (File.Exists(MOTDImagePath))
|
||||
using (FileStream imageStream = new FileStream(MOTDImagePath, FileMode.Open, FileAccess.Read))
|
||||
@@ -495,6 +475,8 @@ namespace JDP {
|
||||
CUEToolsScript script = (CUEToolsScript)p[6];
|
||||
DialogResult dlgRes = DialogResult.OK;
|
||||
string status = null;
|
||||
bool outputAudio = action == CUEAction.Encode && audioEncoderType != AudioEncoderType.NoAudio;
|
||||
bool useAR = action == CUEAction.Verify || (outputAudio && checkBoxUseAccurateRip.Checked);
|
||||
|
||||
try
|
||||
{
|
||||
@@ -743,7 +725,6 @@ namespace JDP {
|
||||
}
|
||||
else if (File.Exists(pathIn) || IsCDROM(pathIn))
|
||||
{
|
||||
bool convertAction = action == CUEAction.Convert || action == CUEAction.VerifyAndConvert;
|
||||
string pathOut = null;
|
||||
List<object> releases = null;
|
||||
|
||||
@@ -753,12 +734,14 @@ namespace JDP {
|
||||
cueSheet.Action = action;
|
||||
cueSheet.OutputStyle = cueStyle;
|
||||
cueSheet.Open(pathIn);
|
||||
if (action != CUEAction.Convert)
|
||||
cueSheet.DataTrackLengthMSF = txtDataTrackLength.Text;
|
||||
cueSheet.PreGapLengthMSF = txtPreGapLength.Text;
|
||||
cueSheet.Lookup();
|
||||
if (useAR)
|
||||
{
|
||||
cueSheet.DataTrackLengthMSF = txtDataTrackLength.Text;
|
||||
cueSheet.UseAccurateRip();
|
||||
}
|
||||
|
||||
if (_batchPaths.Count == 0 && convertAction)
|
||||
if (_batchPaths.Count == 0 && action == CUEAction.Encode)
|
||||
{
|
||||
if (checkBoxUseFreeDb.Checked || checkBoxUseMusicBrainz.Checked)
|
||||
releases = cueSheet.LookupAlbumInfo(checkBoxUseFreeDb.Checked, checkBoxUseMusicBrainz.Checked);
|
||||
@@ -766,7 +749,7 @@ namespace JDP {
|
||||
|
||||
this.Invoke((MethodInvoker)delegate()
|
||||
{
|
||||
toolStripStatusLabelAR.Visible = action != CUEAction.Convert;// && cueSheet.ArVerify.ARStatus == null;
|
||||
toolStripStatusLabelAR.Visible = useAR;// && cueSheet.ArVerify.ARStatus == null;
|
||||
toolStripStatusLabelAR.Text = cueSheet.ArVerify.ARStatus == null ? cueSheet.ArVerify.WorstTotal().ToString() : "?";
|
||||
toolStripStatusLabelAR.ToolTipText = "AccurateRip: " + (cueSheet.ArVerify.ARStatus ?? "found") + ".";
|
||||
if (releases != null)
|
||||
@@ -792,31 +775,10 @@ namespace JDP {
|
||||
if (dlgRes == DialogResult.Cancel)
|
||||
return;
|
||||
|
||||
bool outputAudio = convertAction && audioEncoderType != AudioEncoderType.NoAudio;
|
||||
bool outputCUE = convertAction && (cueStyle != CUEStyle.SingleFileWithCUE || _profile._config.createCUEFileWhenEmbedded);
|
||||
|
||||
cueSheet.GenerateFilenames(audioEncoderType, outputFormat, pathOut);
|
||||
string outDir = Path.GetDirectoryName(pathOut);
|
||||
if (cueStyle == CUEStyle.SingleFileWithCUE)
|
||||
cueSheet.SingleFilename = Path.GetFileName(pathOut);
|
||||
if (outDir == "")
|
||||
outDir = ".";
|
||||
|
||||
bool outputExists = false;
|
||||
if (outputCUE)
|
||||
outputExists = File.Exists(pathOut);
|
||||
if (outputAudio)
|
||||
{
|
||||
if (cueStyle == CUEStyle.SingleFile || cueStyle == CUEStyle.SingleFileWithCUE)
|
||||
outputExists |= File.Exists(Path.Combine(outDir, cueSheet.SingleFilename));
|
||||
else
|
||||
{
|
||||
if (cueStyle == CUEStyle.GapsAppended && _profile._config.preserveHTOA)
|
||||
outputExists |= File.Exists(Path.Combine(outDir, cueSheet.HTOAFilename));
|
||||
for (int i = 0; i < cueSheet.TrackCount; i++)
|
||||
outputExists |= File.Exists(Path.Combine(outDir, cueSheet.TrackFilenames[i]));
|
||||
}
|
||||
}
|
||||
bool outputExists = cueSheet.OutputExists();
|
||||
|
||||
dlgRes = DialogResult.Cancel;
|
||||
if (outputExists)
|
||||
{
|
||||
@@ -872,8 +834,7 @@ namespace JDP {
|
||||
//reportForm.Message = _batchReport.ToString();
|
||||
//reportForm.ShowDialog(this);
|
||||
}
|
||||
else if (cueSheet.Action == CUEAction.Verify ||
|
||||
(cueSheet.Action == CUEAction.VerifyAndConvert && audioEncoderType != AudioEncoderType.NoAudio))
|
||||
else if (useAR)
|
||||
{
|
||||
using (StringWriter sw = new StringWriter())
|
||||
{
|
||||
@@ -963,8 +924,8 @@ namespace JDP {
|
||||
}
|
||||
|
||||
private void SetupControls(bool running) {
|
||||
bool converting = (SelectedAction == CUEAction.Convert || SelectedAction == CUEAction.VerifyAndConvert);
|
||||
bool verifying = (SelectedAction == CUEAction.Verify || SelectedAction == CUEAction.VerifyAndConvert);
|
||||
bool converting = (SelectedAction == CUEAction.Encode);
|
||||
bool verifying = (SelectedAction == CUEAction.Verify || (SelectedAction == CUEAction.Encode && SelectedOutputAudioType != AudioEncoderType.NoAudio && checkBoxUseAccurateRip.Checked));
|
||||
//grpInput.Enabled = !running;
|
||||
toolStripMenu.Enabled = !running;
|
||||
fileSystemTreeView1.Enabled = !running;
|
||||
@@ -979,10 +940,10 @@ namespace JDP {
|
||||
grpOutputPathGeneration.Enabled = !running;
|
||||
grpAudioOutput.Enabled = !running && converting;
|
||||
grpAction.Enabled = !running;
|
||||
checkBoxUseFreeDb.Enabled =
|
||||
checkBoxUseMusicBrainz.Enabled =
|
||||
checkBoxUseAccurateRip.Enabled =
|
||||
!running && !(FileBrowserState == FileBrowserStateEnum.DragDrop || FileBrowserState == FileBrowserStateEnum.Checkboxes) && converting;
|
||||
//checkBoxUseFreeDb.Enabled =
|
||||
// checkBoxUseMusicBrainz.Enabled =
|
||||
// checkBoxUseAccurateRip.Enabled =
|
||||
// !(FileBrowserState == FileBrowserStateEnum.DragDrop || FileBrowserState == FileBrowserStateEnum.Checkboxes) && converting;
|
||||
txtDataTrackLength.Enabled = !running && verifying;
|
||||
txtPreGapLength.Enabled = !running;
|
||||
btnConvert.Visible = !running;
|
||||
@@ -1350,6 +1311,7 @@ namespace JDP {
|
||||
? toolStripMenuItemOutputManual : toolStripMenuItemOutputBrowse;
|
||||
toolStripSplitButtonOutputBrowser.Text = toolStripSplitButtonOutputBrowser.DefaultItem.Text;
|
||||
toolStripSplitButtonOutputBrowser.Image = toolStripSplitButtonOutputBrowser.DefaultItem.Image;
|
||||
toolStripSplitButtonOutputBrowser.Enabled = toolStripSplitButtonOutputBrowser.DefaultItem.Enabled;
|
||||
UpdateOutputPath();
|
||||
}
|
||||
}
|
||||
@@ -1375,6 +1337,7 @@ namespace JDP {
|
||||
set
|
||||
{
|
||||
ToolStripMenuItem inputBtn = FileBrowserStateButton(value);
|
||||
if (inputBtn == null) { value = FileBrowserStateEnum.Hidden; inputBtn = toolStripMenuItemInputBrowserHide; }
|
||||
ToolStripMenuItem defaultBtn = FileBrowserStateButton(value != FileBrowserStateEnum.Hidden
|
||||
? FileBrowserStateEnum.Hidden : _fileBrowserControlState == FileBrowserStateEnum.Hidden
|
||||
? FileBrowserStateEnum.Tree : _fileBrowserControlState);
|
||||
@@ -1465,8 +1428,7 @@ namespace JDP {
|
||||
rbActionVerify.Checked ? CUEAction.Verify :
|
||||
rbActionCorrectFilenames.Checked ? CUEAction.CorrectFilenames :
|
||||
rbActionCreateCUESheet.Checked ? CUEAction.CreateDummyCUE :
|
||||
checkBoxUseAccurateRip.Checked ? CUEAction.VerifyAndConvert :
|
||||
CUEAction.Convert;
|
||||
CUEAction.Encode;
|
||||
}
|
||||
set
|
||||
{
|
||||
@@ -1707,9 +1669,10 @@ namespace JDP {
|
||||
}
|
||||
set
|
||||
{
|
||||
CUEAction action = SelectedAction;
|
||||
comboBoxScript.Items.Clear();
|
||||
foreach (KeyValuePair<string, CUEToolsScript> script in _profile._config.scripts)
|
||||
if (script.Value.conditions.Contains(SelectedAction))
|
||||
if (script.Value.conditions.Contains(action))
|
||||
comboBoxScript.Items.Add(script.Value);
|
||||
comboBoxScript.Enabled = btnConvert.Enabled && comboBoxScript.Items.Count > 1;
|
||||
comboBoxScript.SelectedItem =
|
||||
@@ -1725,9 +1688,8 @@ namespace JDP {
|
||||
case CUEAction.Verify:
|
||||
SelectedScript = _profile._config.defaultVerifyScript;
|
||||
break;
|
||||
case CUEAction.Convert:
|
||||
case CUEAction.VerifyAndConvert:
|
||||
SelectedScript = _profile._config.defaultVerifyAndConvertScript;
|
||||
case CUEAction.Encode:
|
||||
SelectedScript = _profile._config.defaultEncodeScript;
|
||||
break;
|
||||
default:
|
||||
SelectedScript = null;
|
||||
@@ -1742,9 +1704,8 @@ namespace JDP {
|
||||
case CUEAction.Verify:
|
||||
_profile._config.defaultVerifyScript = SelectedScript;
|
||||
break;
|
||||
case CUEAction.Convert:
|
||||
case CUEAction.VerifyAndConvert:
|
||||
_profile._config.defaultVerifyAndConvertScript = SelectedScript;
|
||||
case CUEAction.Encode:
|
||||
_profile._config.defaultEncodeScript = SelectedScript;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1756,7 +1717,7 @@ namespace JDP {
|
||||
if (sender == rbActionVerify && comboBoxScript.SelectedItem != null)
|
||||
SaveScripts(CUEAction.Verify);
|
||||
if (sender == rbActionEncode && comboBoxScript.SelectedItem != null)
|
||||
SaveScripts(CUEAction.VerifyAndConvert);
|
||||
SaveScripts(CUEAction.Encode);
|
||||
return;
|
||||
}
|
||||
UpdateOutputPath();
|
||||
|
||||
@@ -348,7 +348,7 @@
|
||||
<value>E&ingabe:</value>
|
||||
</data>
|
||||
<data name="toolStripLabelOutput.Text" xml:space="preserve">
|
||||
<value>Aus&gabe:</value>
|
||||
<value>Aus&gabe:</value>
|
||||
</data>
|
||||
<data name="toolStripMenuItemCorrectorModeChangeExtension.Text" xml:space="preserve">
|
||||
<value>Neue Erweiterung</value>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -927,4 +927,7 @@
|
||||
<data name="toolStripMenuItemCorrectorModeLocateFiles.ToolTipText" xml:space="preserve">
|
||||
<value>Автоматический поиск переименованных файлов</value>
|
||||
</data>
|
||||
<data name="groupBoxMode.Text" xml:space="preserve">
|
||||
<value>Настройки</value>
|
||||
</data>
|
||||
</root>
|
||||
9
CUETools/frmSettings.Designer.cs
generated
9
CUETools/frmSettings.Designer.cs
generated
@@ -497,6 +497,8 @@ namespace JDP {
|
||||
//
|
||||
// txtSingleFilenameFormat
|
||||
//
|
||||
this.txtSingleFilenameFormat.AutoCompleteCustomSource.AddRange(new string[] {
|
||||
resources.GetString("txtSingleFilenameFormat.AutoCompleteCustomSource")});
|
||||
resources.ApplyResources(this.txtSingleFilenameFormat, "txtSingleFilenameFormat");
|
||||
this.txtSingleFilenameFormat.Name = "txtSingleFilenameFormat";
|
||||
this.toolTip1.SetToolTip(this.txtSingleFilenameFormat, resources.GetString("txtSingleFilenameFormat.ToolTip"));
|
||||
@@ -826,7 +828,12 @@ namespace JDP {
|
||||
this.textBoxARLogExtension.AutoCompleteCustomSource.AddRange(new string[] {
|
||||
resources.GetString("textBoxARLogExtension.AutoCompleteCustomSource"),
|
||||
resources.GetString("textBoxARLogExtension.AutoCompleteCustomSource1"),
|
||||
resources.GetString("textBoxARLogExtension.AutoCompleteCustomSource2")});
|
||||
resources.GetString("textBoxARLogExtension.AutoCompleteCustomSource2"),
|
||||
resources.GetString("textBoxARLogExtension.AutoCompleteCustomSource3"),
|
||||
resources.GetString("textBoxARLogExtension.AutoCompleteCustomSource4"),
|
||||
resources.GetString("textBoxARLogExtension.AutoCompleteCustomSource5"),
|
||||
resources.GetString("textBoxARLogExtension.AutoCompleteCustomSource6"),
|
||||
resources.GetString("textBoxARLogExtension.AutoCompleteCustomSource7")});
|
||||
this.textBoxARLogExtension.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
|
||||
this.textBoxARLogExtension.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource;
|
||||
this.textBoxARLogExtension.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.cUEConfigBindingSource, "ArLogFilenameFormat", true));
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace JDP {
|
||||
numEncodeWhenPercent.Value = _config.encodeWhenPercent;
|
||||
chkEncodeWhenZeroOffset.Checked = _config.encodeWhenZeroOffset;
|
||||
chkFLACVerify.Checked = _config.flacVerify;
|
||||
chkWriteArTagsOnConvert.Checked = _config.writeArTagsOnConvert;
|
||||
chkWriteArTagsOnConvert.Checked = _config.writeArTagsOnEncode;
|
||||
chkWriteARTagsOnVerify.Checked = _config.writeArTagsOnVerify;
|
||||
chkWVExtraMode.Checked = (_config.wvExtraMode != 0);
|
||||
if (_config.wvExtraMode != 0) numWVExtraMode.Value = _config.wvExtraMode;
|
||||
@@ -151,7 +151,7 @@ namespace JDP {
|
||||
listViewScriptConditions.Items.Add(resources.GetString("rbActionVerify.Text").Replace("&", ""));
|
||||
listViewScriptConditions.Items.Add(resources.GetString("rbActionEncode.Text").Replace("&", ""));
|
||||
listViewScriptConditions.Items[0].Tag = CUEAction.Verify;
|
||||
listViewScriptConditions.Items[1].Tag = CUEAction.VerifyAndConvert;
|
||||
listViewScriptConditions.Items[1].Tag = CUEAction.Encode;
|
||||
|
||||
EnableDisable();
|
||||
}
|
||||
@@ -207,7 +207,7 @@ namespace JDP {
|
||||
_config.encodeWhenConfidence = (uint)numEncodeWhenConfidence.Value;
|
||||
_config.encodeWhenZeroOffset = chkEncodeWhenZeroOffset.Checked;
|
||||
_config.flacVerify = chkFLACVerify.Checked;
|
||||
_config.writeArTagsOnConvert = chkWriteArTagsOnConvert.Checked;
|
||||
_config.writeArTagsOnEncode = chkWriteArTagsOnConvert.Checked;
|
||||
_config.writeArTagsOnVerify = chkWriteARTagsOnVerify.Checked;
|
||||
if (!chkWVExtraMode.Checked) _config.wvExtraMode = 0;
|
||||
else _config.wvExtraMode = (int) numWVExtraMode.Value;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user