Compare commits

...

8 Commits
1.3.1 ... 1.3.4

Author SHA1 Message Date
Matt Nadareski
23f1ceac99 Bump version 2024-02-26 20:15:29 -05:00
Deterous
55c621b615 Fill PS3 Disc Key from redump (#3)
* Fill PS3 Disc Key from redump

* Deny NULL rather than only allow hex keys

* Update Builder.cs

Co-authored-by: Matt Nadareski <mnadareski@outlook.com>

---------

Co-authored-by: Matt Nadareski <mnadareski@outlook.com>
2024-02-26 17:04:02 -08:00
Matt Nadareski
29cce4d4b9 Bump version 2024-02-02 11:20:18 -05:00
Matt Nadareski
1f37ece28d Fix typo 2024-02-02 11:20:08 -05:00
Matt Nadareski
6acac60376 Add CD support for GameWave 2024-02-02 11:18:44 -05:00
Matt Nadareski
3f9b09b943 Bump version 2023-12-05 11:04:02 -05:00
Matt Nadareski
2b1ee393d4 Fix some formatting issues 2023-12-04 14:33:56 -05:00
Matt Nadareski
887c443a17 Correct log statement for universal hash 2023-12-04 14:15:36 -05:00
5 changed files with 22 additions and 7 deletions

View File

@@ -386,6 +386,15 @@ namespace SabreTools.RedumpLib
info.DumpersAndStatus.Dumpers = [.. tempDumpers];
}
// PS3 DiscKey
if (string.IsNullOrEmpty(info.Extras!.DiscKey))
{
// Validate key is not NULL
match = Constants.PS3DiscKey.Match(discData);
if (match.Success && match.Groups[1].Value != "<span class=\"null\">NULL</span>")
info.Extras.DiscKey = match.Groups[1].Value;
}
// TODO: Unify handling of fields that can include site codes (Comments/Contents)
// Comments
@@ -721,7 +730,7 @@ namespace SabreTools.RedumpLib
}
}
#endregion
#endregion
#region Helpers

View File

@@ -102,6 +102,11 @@ namespace SabreTools.RedumpLib.Data
/// </summary>
public static Regex PartialMatchRegex = new(@"<td class=""static"">partial match ids: (.*?)</td>");
/// <summary>
/// Regex matching the disc key on a PS3 disc page
/// </summary>
public static Regex PS3DiscKey = new(@"<th>Disc Key</th><th>Disc ID</th><th>Permanent Information & Control \(PIC\)</th></tr><tr><td>(.*?)</td><td>");
/// <summary>
/// Regex matching the PVD field on a disc page
/// </summary>

View File

@@ -239,6 +239,7 @@ namespace SabreTools.RedumpLib.Data
// https://en.wikipedia.org/wiki/Game_Wave_Family_Entertainment_System
case RedumpSystem.ZAPiTGamesGameWaveFamilyEntertainmentSystem:
types.Add(MediaType.CDROM); // Firmware discs only(?)
types.Add(MediaType.DVD);
break;

View File

@@ -7,12 +7,12 @@
<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<Version>1.3.1</Version>
<Version>1.3.4</Version>
<!-- Package Properties -->
<Authors>Matt Nadareski</Authors>
<Description>Code to interact with redump.org</Description>
<Copyright>Copyright (c) Matt Nadareski 2020-2023</Copyright>
<Copyright>Copyright (c) Matt Nadareski 2020-2024</Copyright>
<PackageProjectUrl>https://github.com/SabreTools/</PackageProjectUrl>
<PackageReadmeFile>README.md</PackageReadmeFile>
<RepositoryUrl>https://github.com/SabreTools/SabreTools.RedumpLib</RepositoryUrl>

View File

@@ -142,9 +142,9 @@ namespace SabreTools.RedumpLib
/// <param name="sha1">SHA-1 hash to check against</param>
/// <returns>True if the track was found, false otherwise; List of found values, if possible</returns>
#if NETFRAMEWORK
public async static Task<(bool, List<int>?, string?)> ValidateSingleTrack(RedumpWebClient wc, SubmissionInfo info, string sha1)
public async static Task<(bool, List<int>?, string?)> ValidateSingleTrack(RedumpWebClient wc, SubmissionInfo info, string? sha1)
#else
public async static Task<(bool, List<int>?, string?)> ValidateSingleTrack(RedumpHttpClient wc, SubmissionInfo info, string sha1)
public async static Task<(bool, List<int>?, string?)> ValidateSingleTrack(RedumpHttpClient wc, SubmissionInfo info, string? sha1)
#endif
{
// Get all matching IDs for the track
@@ -190,10 +190,10 @@ namespace SabreTools.RedumpLib
return (false, null, "Universal hash was missing");
// Format the universal hash for finding within the comments
universalHash = $"{universalHash.Substring(0, universalHash.Length - 1)}/comments/only";
string universalHashQuery = $"{universalHash.Substring(0, universalHash.Length - 1)}/comments/only";
// Get all matching IDs for the hash
var newIds = await ListSearchResults(wc, universalHash, filterForwardSlashes: false);
var newIds = await ListSearchResults(wc, universalHashQuery, filterForwardSlashes: false);
// If we got null back, there was an error
if (newIds == null)