Skip to content

Commit e338449

Browse files
committed
CUERipper: Consider allowEmbed of formats
Do not embed the `CUESHEET` tag in case of formats, which do not support it (mp3, m4a, wma, ogg, opus, etc.). - Consider `allowEmbed` of formats - Use `CUEStyle.SingleFile` if embedding of the `CUESHEET` tag is not supported, which also ensures that a .cue file is written. - Resolves #322
1 parent 904491d commit e338449

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

CUERipper/frmCUERipper.cs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -668,8 +668,10 @@ private void buttonGo_Click(object sender, EventArgs e)
668668
data.selectedRelease.metadata.Save();
669669

670670
cueSheet.CopyMetadata(data.selectedRelease.metadata);
671-
cueSheet.OutputStyle = bnComboBoxImage.SelectedIndex == 0 ? CUEStyle.SingleFileWithCUE :
672-
CUEStyle.GapsAppended;
671+
if (bnComboBoxImage.SelectedIndex == 0)
672+
cueSheet.OutputStyle = selectedFormat.allowEmbed ? CUEStyle.SingleFileWithCUE : CUEStyle.SingleFile;
673+
else
674+
cueSheet.OutputStyle = CUEStyle.GapsAppended;
673675
_pathOut = cueSheet.GenerateUniqueOutputPath(bnComboBoxOutputFormat.Text,
674676
cueSheet.OutputStyle == CUEStyle.SingleFileWithCUE ? "." + selectedFormat.ToString() : ".cue",
675677
CUEAction.Encode, null);
@@ -1269,7 +1271,11 @@ private void UpdateOutputPath()
12691271
txtOutputPath.Text = "";
12701272
return;
12711273
}
1272-
CUEStyle style = bnComboBoxImage.SelectedIndex == 0 ? CUEStyle.SingleFileWithCUE : CUEStyle.GapsAppended;
1274+
CUEStyle style;
1275+
if (bnComboBoxImage.SelectedIndex == 0)
1276+
style = selectedFormat.allowEmbed ? CUEStyle.SingleFileWithCUE : CUEStyle.SingleFile;
1277+
else
1278+
style = CUEStyle.GapsAppended;
12731279
CUESheet sheet = new CUESheet(_config);
12741280
sheet.TOC = selectedDriveInfo.drive.TOC;
12751281
sheet.CopyMetadata(data.selectedRelease.metadata);

0 commit comments

Comments
 (0)