From f28cf614c3c42735da70c46509f7f87c2d91a3c4 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Sun, 23 Apr 2023 10:00:13 -0400 Subject: [PATCH] Fix info tool hash finding --- CHANGELIST.md | 1 + MPF.Modules/Aaru/Parameters.cs | 5 +---- MPF.Modules/DiscImageCreator/Parameters.cs | 6 +++--- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/CHANGELIST.md b/CHANGELIST.md index 5b94e080..6ba8c6b1 100644 --- a/CHANGELIST.md +++ b/CHANGELIST.md @@ -34,6 +34,7 @@ - Prepare for future DIC changes - Add suppl support to Xbox - Support single digit subs +- Fix info tool hash finding ### 2.5 (2023-03-12) diff --git a/MPF.Modules/Aaru/Parameters.cs b/MPF.Modules/Aaru/Parameters.cs index b368c9b5..3d05d4e6 100644 --- a/MPF.Modules/Aaru/Parameters.cs +++ b/MPF.Modules/Aaru/Parameters.cs @@ -229,15 +229,12 @@ namespace MPF.Modules.Aaru Datafile datafile = GenerateDatafile(sidecar, basePath); // Fill in the hash data - info.TracksAndWriteOffsets.ClrMameProData = GenerateDatfile(sidecar, basePath); + info.TracksAndWriteOffsets.ClrMameProData = GenerateDatfile(datafile); switch (this.Type) { // TODO: Can this do GD-ROM? case MediaType.CDROM: - // Fill in the hash data - info.TracksAndWriteOffsets.ClrMameProData = GenerateDatfile(datafile); - // TODO: Re-enable once PVD generation / finding is fixed // Generate / obtain the PVD //info.Extras.PVD = GeneratePVD(sidecar) ?? "Disc has no PVD"; diff --git a/MPF.Modules/DiscImageCreator/Parameters.cs b/MPF.Modules/DiscImageCreator/Parameters.cs index 3a6124e0..541b317c 100644 --- a/MPF.Modules/DiscImageCreator/Parameters.cs +++ b/MPF.Modules/DiscImageCreator/Parameters.cs @@ -395,14 +395,14 @@ namespace MPF.Modules.DiscImageCreator // Get the Datafile information Datafile datafile = GetDatafile($"{basePath}.dat"); + // Fill in the hash data + info.TracksAndWriteOffsets.ClrMameProData = GenerateDatfile(datafile); + // Extract info based generically on MediaType switch (this.Type) { case MediaType.CDROM: case MediaType.GDROM: // TODO: Verify GD-ROM outputs this - // Fill in the hash data - info.TracksAndWriteOffsets.ClrMameProData = GenerateDatfile(datafile); - info.Extras.PVD = GetPVD($"{basePath}_mainInfo.txt") ?? "Disc has no PVD"; ; // Audio-only discs will fail if there are any C2 errors, so they would never get here