Universal hash only for audio discs (fixes #524)

This commit is contained in:
Matt Nadareski
2023-07-19 13:33:14 -04:00
parent 758c49c1cc
commit 476c494f4e
4 changed files with 15 additions and 6 deletions

View File

@@ -1,6 +1,7 @@
### WIP (xxxx-xx-xx)
- Ensure custom parameters properly set
- Universal hash only for audio discs
### 2.6.1 (2023-07-19)

View File

@@ -101,6 +101,7 @@ namespace MPF.Core.Utilities
case RedumpSystem.HasbroVideoNowJr:
case RedumpSystem.HasbroVideoNowXP:
case RedumpSystem.PhilipsCDi:
case RedumpSystem.PlayStationGameSharkUpdates:
case RedumpSystem.SuperAudioCD:
return true;
default:

View File

@@ -445,9 +445,12 @@ namespace MPF.Modules.DiscImageCreator
string cdMultiSessionInfo = GetMultisessionInformation($"{basePath}_disc.txt") ?? string.Empty;
info.CommonDiscInfo.CommentsSpecialFields[SiteCode.Multisession] = cdMultiSessionInfo;
// Attempt to get the universal hash
string universalHash = GetUniversalHash($"{basePath}_disc.txt") ?? string.Empty;
info.CommonDiscInfo.CommentsSpecialFields[SiteCode.UniversalHash] = universalHash;
// Attempt to get the universal hash, if it's an audio disc
if (this.System.IsAudio())
{
string universalHash = GetUniversalHash($"{basePath}_disc.txt") ?? string.Empty;
info.CommonDiscInfo.CommentsSpecialFields[SiteCode.UniversalHash] = universalHash;
}
break;

View File

@@ -5,6 +5,7 @@ using System.Linq;
using System.Text.RegularExpressions;
using MPF.Core.Converters;
using MPF.Core.Data;
using MPF.Core.Utilities;
using RedumpLib.Data;
namespace MPF.Modules.Redumper
@@ -275,9 +276,12 @@ namespace MPF.Modules.Redumper
string cdMultiSessionInfo = GetMultisessionInformation($"{basePath}.log") ?? string.Empty;
info.CommonDiscInfo.CommentsSpecialFields[SiteCode.Multisession] = cdMultiSessionInfo;
// Attempt to get the universal hash
string universalHash = GetUniversalHash($"{basePath}.log") ?? string.Empty;
info.CommonDiscInfo.CommentsSpecialFields[SiteCode.UniversalHash] = universalHash;
// Attempt to get the universal hash, if it's an audio disc
if (this.System.IsAudio())
{
string universalHash = GetUniversalHash($"{basePath}.log") ?? string.Empty;
info.CommonDiscInfo.CommentsSpecialFields[SiteCode.UniversalHash] = universalHash;
}
// Attempt to get the non-zero data start
string ringNonZeroDataStart = GetRingNonZeroDataStart($"{basePath}.log") ?? string.Empty;