Compare commits

...

13 Commits
1.3.0 ... 1.3.5

Author SHA1 Message Date
Matt Nadareski
7e81f723ca Bump version 2024-03-05 12:30:59 -05:00
Matt Nadareski
f69c7e6bb2 Add new dumping info fields 2024-03-02 19:41:19 -05:00
Matt Nadareski
9d2803a6df Add nuget package and PR workflows 2024-02-27 19:16:31 -05:00
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
Matt Nadareski
5ad9bebf88 Bump version 2023-11-22 23:13:09 -05:00
Matt Nadareski
8c8e624ac2 Update compatiblity libraries 2023-11-22 23:12:44 -05:00
8 changed files with 94 additions and 13 deletions

43
.github/workflows/build_nupkg.yml vendored Normal file
View File

@@ -0,0 +1,43 @@
name: Nuget Pack
on:
push:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore
- name: Pack
run: dotnet pack
- name: Upload build
uses: actions/upload-artifact@v4
with:
name: 'Nuget Package'
path: 'bin/Release/*.nupkg'
- name: Upload to rolling
uses: ncipollo/release-action@v1.14.0
with:
allowUpdates: True
artifacts: 'bin/Release/*.nupkg'
body: 'Last built commit: ${{ github.sha }}'
name: 'Rolling Release'
prerelease: True
replacesArtifacts: True
tag: "rolling"
updateOnlyUnreleased: True

17
.github/workflows/check_pr.yml vendored Normal file
View File

@@ -0,0 +1,17 @@
name: Build PR
on: [pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Build
run: dotnet build

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

@@ -530,6 +530,10 @@ namespace SabreTools.RedumpLib.Data
/// </summary>
public class DumpingInfoSection : ICloneable
{
// Name not defined by Redump -- Only used with MPF
[JsonProperty(PropertyName = "d_frontend_version", Required = Required.AllowNull)]
public string? FrontendVersion { get; set; }
// Name not defined by Redump
[JsonProperty(PropertyName = "d_dumping_program", Required = Required.AllowNull)]
public string? DumpingProgram { get; set; }
@@ -554,16 +558,22 @@ namespace SabreTools.RedumpLib.Data
[JsonProperty(PropertyName = "d_reported_disc_type", Required = Required.AllowNull)]
public string? ReportedDiscType { get; set; }
// Name not defined by Redump -- Only used with Redumper
[JsonProperty(PropertyName = "d_errors_c2", NullValueHandling = NullValueHandling.Ignore)]
public string? C2ErrorsCount { get; set; }
public object Clone()
{
return new DumpingInfoSection
{
FrontendVersion = this.FrontendVersion,
DumpingProgram = this.DumpingProgram,
DumpingDate = this.DumpingDate,
Manufacturer = this.Manufacturer,
Model = this.Model,
Firmware = this.Firmware,
ReportedDiscType = this.ReportedDiscType,
C2ErrorsCount = this.C2ErrorsCount,
};
}
}

View File

@@ -7,12 +7,12 @@
<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<Version>1.3.0</Version>
<Version>1.3.5</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>
@@ -26,16 +26,12 @@
</ItemGroup>
<!-- Support for old .NET versions -->
<ItemGroup Condition="$(TargetFramework.StartsWith(`net2`))">
<PackageReference Include="LinqBridge" Version="1.3.0" />
</ItemGroup>
<ItemGroup Condition="$(TargetFramework.StartsWith(`net2`)) OR $(TargetFramework.StartsWith(`net3`))">
<PackageReference Include="MinValueTupleBridge" Version="0.2.1" />
</ItemGroup>
<ItemGroup Condition="$(TargetFramework.StartsWith(`net2`)) OR $(TargetFramework.StartsWith(`net3`)) OR $(TargetFramework.StartsWith(`net40`))">
<PackageReference Include="MinAsyncBridge" Version="0.12.2" />
</ItemGroup>
<ItemGroup Condition="$(TargetFramework.StartsWith(`net3`)) OR $(TargetFramework.StartsWith(`net40`))">
<PackageReference Include="MinAsyncBridge" Version="0.12.4" />
<PackageReference Include="MinThreadingBridge" Version="0.11.4" />
<PackageReference Include="Net30.LinqBridge" Version="1.3.0" />
</ItemGroup>
<ItemGroup Condition="$(TargetFramework.StartsWith(`net4`))">

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)