Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add setting for writing dummy CUE sheet comment #347

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CUETools.Processor/CUEConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public class CUEConfig
public bool extractLog;
public bool alwaysWriteUTF8CUEFile;
public bool writeUTF8BOM;
public bool writeDummyCUESheetComment;
public bool fillUpCUE;
public bool overwriteCUEData;
public bool filenamesANSISafe;
Expand Down Expand Up @@ -112,6 +113,7 @@ public CUEConfig()
extractLog = true;
alwaysWriteUTF8CUEFile = false;
writeUTF8BOM = true;
writeDummyCUESheetComment = true;
fillUpCUE = true;
overwriteCUEData = false;
filenamesANSISafe = true;
Expand Down Expand Up @@ -200,6 +202,7 @@ public CUEConfig(CUEConfig src)
extractLog = src.extractLog;
alwaysWriteUTF8CUEFile = src.alwaysWriteUTF8CUEFile;
writeUTF8BOM = src.writeUTF8BOM;
writeDummyCUESheetComment = src.writeDummyCUESheetComment;
fillUpCUE = src.fillUpCUE;
overwriteCUEData = src.overwriteCUEData;
filenamesANSISafe = src.filenamesANSISafe;
Expand Down Expand Up @@ -289,6 +292,7 @@ public void Save(SettingsWriter sw)
sw.Save("ExtractLog", extractLog);
sw.Save("AlwaysWriteUTF8CUEFile", alwaysWriteUTF8CUEFile);
sw.Save("WriteUTF8BOM", writeUTF8BOM);
sw.Save("WriteDummyCUESheetComment", writeDummyCUESheetComment);
sw.Save("FillUpCUE", fillUpCUE);
sw.Save("OverwriteCUEData", overwriteCUEData);
sw.Save("FilenamesANSISafe", filenamesANSISafe);
Expand Down Expand Up @@ -396,6 +400,7 @@ public void Load(SettingsReader sr)
extractLog = sr.LoadBoolean("ExtractLog") ?? true;
alwaysWriteUTF8CUEFile = sr.LoadBoolean("AlwaysWriteUTF8CUEFile") ?? false;
writeUTF8BOM = sr.LoadBoolean("WriteUTF8BOM") ?? true;
writeDummyCUESheetComment = sr.LoadBoolean("WriteDummyCUESheetComment") ?? true;
fillUpCUE = sr.LoadBoolean("FillUpCUE") ?? true;
overwriteCUEData = sr.LoadBoolean("OverwriteCUEData") ?? false;
filenamesANSISafe = sr.LoadBoolean("FilenamesANSISafe") ?? true;
Expand Down
3 changes: 2 additions & 1 deletion CUETools.Processor/CUESheet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3888,7 +3888,8 @@ public static string CreateDummyCUESheet(CUEConfig _config, FileGroupInfo fileGr
}

StringWriter sw = new StringWriter();
sw.WriteLine(String.Format("REM COMMENT \"CUETools generated dummy CUE sheet\""));
if (_config.writeDummyCUESheetComment)
sw.WriteLine(String.Format("REM COMMENT \"CUETools generated dummy CUE sheet\""));
int trackNo = 0;
foreach (FileSystemInfo file in fileGroup.files)
{
Expand Down