mirror of
https://github.com/SabreTools/MPF.git
synced 2026-07-02 17:24:48 +00:00
Fix audio disc error count (fixes #215)
This commit is contained in:
@@ -1580,6 +1580,11 @@ namespace DICUI.DiscImageCreator
|
||||
{
|
||||
string outputDirectory = Path.GetDirectoryName(basePath);
|
||||
|
||||
// Some disc types are audio-only
|
||||
bool audioOnly = (system == KnownSystem.AtariJaguarCD)
|
||||
|| (system == KnownSystem.AudioCD)
|
||||
|| (system == KnownSystem.SuperAudioCD);
|
||||
|
||||
// Fill in the hash data
|
||||
info.TracksAndWriteOffsets.ClrMameProData = GetDatfile(basePath + ".dat");
|
||||
|
||||
@@ -1590,13 +1595,22 @@ namespace DICUI.DiscImageCreator
|
||||
case MediaType.GDROM: // TODO: Verify GD-ROM outputs this
|
||||
info.Extras.PVD = GetPVD(basePath + "_mainInfo.txt") ?? "Disc has no PVD"; ;
|
||||
|
||||
long errorCount = -1;
|
||||
if (File.Exists(basePath + ".img_EdcEcc.txt"))
|
||||
errorCount = GetErrorCount(basePath + ".img_EdcEcc.txt");
|
||||
else if (File.Exists(basePath + ".img_EccEdc.txt"))
|
||||
errorCount = GetErrorCount(basePath + ".img_EccEdc.txt");
|
||||
// Audio-only discs will fail if there are any C2 errors, so they would never get here
|
||||
if (audioOnly)
|
||||
{
|
||||
info.CommonDiscInfo.ErrorsCount = "0";
|
||||
}
|
||||
else
|
||||
{
|
||||
long errorCount = -1;
|
||||
if (File.Exists(basePath + ".img_EdcEcc.txt"))
|
||||
errorCount = GetErrorCount(basePath + ".img_EdcEcc.txt");
|
||||
else if (File.Exists(basePath + ".img_EccEdc.txt"))
|
||||
errorCount = GetErrorCount(basePath + ".img_EccEdc.txt");
|
||||
|
||||
info.CommonDiscInfo.ErrorsCount = (errorCount == -1 ? "Error retrieving error count" : errorCount.ToString());
|
||||
}
|
||||
|
||||
info.CommonDiscInfo.ErrorsCount = (errorCount == -1 ? "Error retrieving error count" : errorCount.ToString());
|
||||
info.TracksAndWriteOffsets.Cuesheet = GetFullFile(basePath + ".cue") ?? "";
|
||||
|
||||
string cdWriteOffset = GetWriteOffset(basePath + "_disc.txt") ?? "";
|
||||
|
||||
Reference in New Issue
Block a user