Update RedumpLib to 1.10.0

This commit is contained in:
Matt Nadareski
2026-03-08 20:28:39 -04:00
parent 6d8a38c960
commit 4e3a531d63
17 changed files with 113 additions and 35 deletions

View File

@@ -57,6 +57,7 @@
- Add Portuguese translation (Kokasgui)
- Wire up Portuguese translation, fix Redumper enum
- Add Portuguese to UI code
- Update RedumpLib to 1.10.0
### 3.6.0 (2025-11-28)

View File

@@ -44,7 +44,7 @@
<ItemGroup>
<PackageReference Include="SabreTools.CommandLine" Version="[1.4.0]" />
<PackageReference Include="SabreTools.RedumpLib" Version="[1.9.2]" />
<PackageReference Include="SabreTools.RedumpLib" Version="[1.10.0]" />
</ItemGroup>
</Project>

View File

@@ -54,6 +54,8 @@ namespace MPF.Check.Features
Options.Processing.Login.RedumpUsername = null;
Options.Processing.Login.RedumpPassword = null;
Options.Processing.Login.RetrieveMatchInformation = true;
Options.Processing.Login.AttemptCount = 3;
Options.Processing.Login.TimeoutSeconds = 30;
// Media Information
Options.Processing.MediaInformation.AddPlaceholders = true;
@@ -92,18 +94,20 @@ namespace MPF.Check.Features
Console.WriteLine($"5) Create IRD (Currently '{Options.Processing.CreateIRDAfterDumping}')");
Console.WriteLine($"6) Attempt Redump matches (Currently '{Options.Processing.Login.RetrieveMatchInformation}')");
Console.WriteLine($"7) Redump credentials (Currently '{Options.Processing.Login.RedumpUsername}')");
Console.WriteLine($"8) Pull all information (Currently '{Options.Processing.Login.PullAllInformation}')");
Console.WriteLine($"9) Set device path (Currently '{DevicePath}')");
Console.WriteLine($"A) Scan for protection (Currently '{scan}')");
Console.WriteLine($"B) Scan archives for protection (Currently '{enableArchives}')");
Console.WriteLine($"C) Debug protection scan output (Currently '{enableDebug}')");
Console.WriteLine($"D) Hide drive letters in protection output (Currently '{hideDriveLetters}')");
Console.WriteLine($"E) Hide filename suffix (Currently '{Options.Processing.AddFilenameSuffix}')");
Console.WriteLine($"F) Output submission JSON (Currently '{Options.Processing.OutputSubmissionJSON}')");
Console.WriteLine($"G) Include JSON artifacts (Currently '{Options.Processing.IncludeArtifacts}')");
Console.WriteLine($"H) Compress logs (Currently '{Options.Processing.CompressLogFiles}')");
Console.WriteLine($"I) Log compression (Currently '{Options.Processing.LogCompression.LongName()}')");
Console.WriteLine($"J) Delete unnecessary files (Currently '{Options.Processing.DeleteUnnecessaryFiles}')");
Console.WriteLine($"8) Redump client attempt count (Currently '{Options.Processing.Login.AttemptCount}')");
Console.WriteLine($"9) Redump client timeout in seconds (Currently '{Options.Processing.Login.TimeoutSeconds}')");
Console.WriteLine($"A) Pull all information (Currently '{Options.Processing.Login.PullAllInformation}')");
Console.WriteLine($"B) Set device path (Currently '{DevicePath}')");
Console.WriteLine($"C) Scan for protection (Currently '{scan}')");
Console.WriteLine($"D) Scan archives for protection (Currently '{enableArchives}')");
Console.WriteLine($"E) Debug protection scan output (Currently '{enableDebug}')");
Console.WriteLine($"F) Hide drive letters in protection output (Currently '{hideDriveLetters}')");
Console.WriteLine($"G) Hide filename suffix (Currently '{Options.Processing.AddFilenameSuffix}')");
Console.WriteLine($"H) Output submission JSON (Currently '{Options.Processing.OutputSubmissionJSON}')");
Console.WriteLine($"I) Include JSON artifacts (Currently '{Options.Processing.IncludeArtifacts}')");
Console.WriteLine($"J) Compress logs (Currently '{Options.Processing.CompressLogFiles}')");
Console.WriteLine($"K) Log compression (Currently '{Options.Processing.LogCompression.LongName()}')");
Console.WriteLine($"L) Delete unnecessary files (Currently '{Options.Processing.DeleteUnnecessaryFiles}')");
Console.WriteLine();
Console.WriteLine($"Q) Exit the program");
Console.WriteLine($"X) Start checking");
@@ -130,47 +134,53 @@ namespace MPF.Check.Features
case "7":
goto redumpCredentials;
case "8":
Options.Processing.Login.PullAllInformation = !Options.Processing.Login.PullAllInformation;
goto root;
goto attemptCount;
case "9":
goto devicePath;
goto timeoutSeconds;
case "a":
case "A":
scan = !scan;
Options.Processing.Login.PullAllInformation = !Options.Processing.Login.PullAllInformation;
goto root;
case "b":
case "B":
enableArchives = !enableArchives;
goto root;
goto devicePath;
case "c":
case "C":
enableDebug = !enableDebug;
scan = !scan;
goto root;
case "d":
case "D":
hideDriveLetters = !hideDriveLetters;
enableArchives = !enableArchives;
goto root;
case "e":
case "E":
Options.Processing.AddFilenameSuffix = !Options.Processing.AddFilenameSuffix;
enableDebug = !enableDebug;
goto root;
case "f":
case "F":
Options.Processing.OutputSubmissionJSON = !Options.Processing.OutputSubmissionJSON;
hideDriveLetters = !hideDriveLetters;
goto root;
case "g":
case "G":
Options.Processing.IncludeArtifacts = !Options.Processing.IncludeArtifacts;
Options.Processing.AddFilenameSuffix = !Options.Processing.AddFilenameSuffix;
goto root;
case "h":
case "H":
Options.Processing.CompressLogFiles = !Options.Processing.CompressLogFiles;
Options.Processing.OutputSubmissionJSON = !Options.Processing.OutputSubmissionJSON;
goto root;
case "i":
case "I":
goto logCompression;
Options.Processing.IncludeArtifacts = !Options.Processing.IncludeArtifacts;
goto root;
case "j":
case "J":
Options.Processing.CompressLogFiles = !Options.Processing.CompressLogFiles;
goto root;
case "k":
case "K":
goto logCompression;
case "l":
case "L":
Options.Processing.DeleteUnnecessaryFiles = !Options.Processing.DeleteUnnecessaryFiles;
goto root;
@@ -251,6 +261,26 @@ namespace MPF.Check.Features
goto root;
attemptCount:
Console.WriteLine();
Console.WriteLine("Enter your attempt count and press Enter:");
Console.Write("> ");
string possibleAttemptCount = Console.ReadLine();
if (int.TryParse(possibleAttemptCount, out int attemptCount) && attemptCount > 0)
Options.Processing.Login.AttemptCount = attemptCount;
goto root;
timeoutSeconds:
Console.WriteLine();
Console.WriteLine("Enter your timeout in seconds and press Enter:");
Console.Write("> ");
string possibleTimeout = Console.ReadLine();
if (int.TryParse(possibleTimeout, out int timeoutSeconds) && timeoutSeconds > 0)
Options.Processing.Login.TimeoutSeconds = timeoutSeconds;
goto root;
devicePath:
Console.WriteLine();
Console.WriteLine("Input the device path and press Enter:");

View File

@@ -24,6 +24,9 @@ namespace MPF.Check.Features
#region Inputs
private const string _attemptCountName = "attempt-count";
internal readonly Int32Input AttemptCountInput = new(_attemptCountName, "--attempt-count", "Set Redump client attempt count (must be greater than 0)");
private const string _createIrdName = "create-ird";
internal readonly FlagInput CreateIrdInput = new(_createIrdName, "--create-ird", "Create IRD from output files (PS3 only)");
@@ -72,6 +75,9 @@ namespace MPF.Check.Features
private const string _suffixName = "suffix";
internal readonly FlagInput SuffixInput = new(_suffixName, ["-x", "--suffix"], "Enable adding filename suffix");
private const string _timeoutSecondsName = "timeout-secondss";
internal readonly Int32Input TimeoutSecondsInput = new(_timeoutSecondsName, "--timeout-seconds", "Set Redump client timeout in seconds (must be greater than 0)");
private const string _useName = "use";
internal readonly StringInput UseInput = new(_useName, ["-u", "--use"], "Override configured dumping program name");
@@ -93,6 +99,8 @@ namespace MPF.Check.Features
Add(NoRetrieveInput);
Add(UsernameInput);
Add(PasswordInput);
Add(AttemptCountInput);
Add(TimeoutSecondsInput);
Add(PullAllInput);
Add(PathInput);
Add(ScanInput);
@@ -140,6 +148,8 @@ namespace MPF.Check.Features
Options.Processing.Login.RedumpUsername = null;
Options.Processing.Login.RedumpPassword = null;
Options.Processing.Login.RetrieveMatchInformation = true;
Options.Processing.Login.AttemptCount = 3;
Options.Processing.Login.TimeoutSeconds = 30;
// Media Information
Options.Processing.MediaInformation.AddPlaceholders = true;
@@ -196,6 +206,14 @@ namespace MPF.Check.Features
else if (PasswordInput.ProcessInput(args, ref index))
Options.Processing.Login.RedumpPassword = PasswordInput.Value;
// Attempt count
else if (AttemptCountInput.ProcessInput(args, ref index) && AttemptCountInput.Value > 0)
Options.Processing.Login.AttemptCount = AttemptCountInput.Value ?? 3;
// Timeout seconds
else if (TimeoutSecondsInput.ProcessInput(args, ref index) && TimeoutSecondsInput.Value > 0)
Options.Processing.Login.TimeoutSeconds = TimeoutSecondsInput.Value ?? 30;
// Pull all information (requires Redump login)
else if (PullAllInput.ProcessInput(args, ref index))
Options.Processing.Login.PullAllInformation = !Options.Processing.Login.PullAllInformation;

View File

@@ -44,7 +44,7 @@
<ItemGroup>
<PackageReference Include="SabreTools.CommandLine" Version="[1.4.0]" />
<PackageReference Include="SabreTools.RedumpLib" Version="[1.9.2]" />
<PackageReference Include="SabreTools.RedumpLib" Version="[1.10.0]" />
</ItemGroup>
</Project>

View File

@@ -151,6 +151,8 @@ namespace MPF.Check
commandSet.Add(mainFeature.NoRetrieveInput);
commandSet.Add(mainFeature.UsernameInput);
commandSet.Add(mainFeature.PasswordInput);
commandSet.Add(mainFeature.AttemptCountInput);
commandSet.Add(mainFeature.TimeoutSecondsInput);
commandSet.Add(mainFeature.PullAllInput);
commandSet.Add(mainFeature.PathInput);
commandSet.Add(mainFeature.ScanInput);

View File

@@ -17,7 +17,7 @@
<PackageReference Include="Microsoft.CodeCoverage" Version="18.0.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
<PackageReference Include="SabreTools.RedumpLib" Version="[1.9.2]" />
<PackageReference Include="SabreTools.RedumpLib" Version="[1.10.0]" />
<PackageReference Include="xunit" Version="2.9.3" />
<PackageReference Include="xunit.abstractions" Version="2.0.3" />
<PackageReference Include="xunit.analyzers" Version="1.27.0" />

View File

@@ -32,7 +32,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="SabreTools.RedumpLib" Version="[1.9.2]" />
<PackageReference Include="SabreTools.RedumpLib" Version="[1.10.0]" />
</ItemGroup>
</Project>

View File

@@ -17,7 +17,7 @@
<PackageReference Include="Microsoft.CodeCoverage" Version="18.0.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
<PackageReference Include="SabreTools.RedumpLib" Version="[1.9.2]" />
<PackageReference Include="SabreTools.RedumpLib" Version="[1.10.0]" />
<PackageReference Include="xunit" Version="2.9.3" />
<PackageReference Include="xunit.abstractions" Version="2.0.3" />
<PackageReference Include="xunit.analyzers" Version="1.27.0" />

View File

@@ -128,6 +128,8 @@ namespace MPF.Frontend.Features
Console.WriteLine($" Redump Username = {options.Processing.Login.RedumpUsername}");
Console.WriteLine($" Redump Password = {(string.IsNullOrEmpty(options.Processing.Login.RedumpPassword) ? "[UNSET]" : "[SET]")}");
Console.WriteLine($" Retrieve Match Information = {options.Processing.Login.RetrieveMatchInformation}");
Console.WriteLine($" Redump client attempt count = {options.Processing.Login.AttemptCount}");
Console.WriteLine($" Redump client timeout in seconds = {options.Processing.Login.TimeoutSeconds}");
Console.WriteLine();
// Media Information

View File

@@ -38,7 +38,7 @@
<PackageReference Include="MinThreadingBridge" Version="0.11.4" Condition="$(TargetFramework.StartsWith(`net2`)) OR $(TargetFramework.StartsWith(`net3`)) OR $(TargetFramework.StartsWith(`net40`))" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
<PackageReference Include="SabreTools.CommandLine" Version="[1.4.0]" />
<PackageReference Include="SabreTools.RedumpLib" Version="[1.9.2]" />
<PackageReference Include="SabreTools.RedumpLib" Version="[1.10.0]" />
<PackageReference Include="System.Net.Http" Version="4.3.4" Condition="!$(TargetFramework.StartsWith(`net2`)) AND !$(TargetFramework.StartsWith(`net3`)) AND !$(TargetFramework.StartsWith(`net40`)) AND !$(TargetFramework.StartsWith(`net452`))" />
</ItemGroup>

View File

@@ -151,6 +151,8 @@ namespace MPF.Frontend
Processing.Login.RedumpUsername = source.Processing.Login.RedumpUsername;
Processing.Login.RedumpPassword = source.Processing.Login.RedumpPassword;
Processing.Login.RetrieveMatchInformation = source.Processing.Login.RetrieveMatchInformation;
Processing.Login.AttemptCount = source.Processing.Login.AttemptCount;
Processing.Login.TimeoutSeconds = source.Processing.Login.TimeoutSeconds;
Processing.MediaInformation.AddPlaceholders = source.Processing.MediaInformation.AddPlaceholders;
Processing.MediaInformation.EnableRedumpCompatibility = source.Processing.MediaInformation.EnableRedumpCompatibility;
@@ -730,6 +732,18 @@ namespace MPF.Frontend
/// </summary>
/// <remarks>Version 1 and greater</remarks>
public bool RetrieveMatchInformation { get; set; } = true;
/// <summary>
/// Maximum attempt count for any operation
/// </summary>
/// <remarks>Value has to be greater than 0</remarks>
public int AttemptCount { get; set; } = 3;
/// <summary>
/// The timespan to wait before the request times out.
/// </summary>
/// <remarks>Value has to be greater than 0</remarks>
public int TimeoutSeconds { get; set; } = 30;
}
/// <summary>

View File

@@ -421,6 +421,8 @@ namespace MPF.Frontend.Tools
options.Processing.Login.RedumpUsername = GetStringSetting(source, "RedumpUsername", string.Empty);
options.Processing.Login.RedumpPassword = GetStringSetting(source, "RedumpPassword", string.Empty);
options.Processing.Login.RetrieveMatchInformation = GetBooleanSetting(source, "RetrieveMatchInformation", true);
options.Processing.Login.AttemptCount = GetInt32Setting(source, "AttemptCount", 3);
options.Processing.Login.TimeoutSeconds = GetInt32Setting(source, "TimeoutSeconds", 30);
options.Processing.MediaInformation.AddPlaceholders = GetBooleanSetting(source, "AddPlaceholders", true);
options.Processing.MediaInformation.EnableRedumpCompatibility = GetBooleanSetting(source, "EnableRedumpCompatibility", true);
@@ -529,6 +531,8 @@ namespace MPF.Frontend.Tools
{ "RetrieveMatchInformation", options.Processing.Login.RetrieveMatchInformation.ToString() },
{ "RedumpUsername", options.Processing.Login.RedumpUsername },
{ "RedumpPassword", options.Processing.Login.RedumpPassword },
{ "AttemptCount", options.Processing.Login.AttemptCount.ToString() },
{ "TimeoutSeconds", options.Processing.Login.TimeoutSeconds.ToString() },
};
}

View File

@@ -190,7 +190,14 @@ namespace MPF.Frontend.Tools
info.PartiallyMatchedIDs = [];
// Login to Redump, if possible
var wc = new RedumpClient();
int attemptCount = options.Processing.Login.AttemptCount;
int timeoutSeconds = options.Processing.Login.TimeoutSeconds;
var wc = new RedumpClient
{
AttemptCount = attemptCount > 0 ? attemptCount : 3,
Timeout = TimeSpan.FromSeconds(timeoutSeconds > 0 ? timeoutSeconds : 30),
};
if (!string.IsNullOrEmpty(options.Processing.Login.RedumpUsername) && !string.IsNullOrEmpty(options.Processing.Login.RedumpPassword))
{
resultProgress?.Report(ResultEventArgs.Neutral("Attempting to log in to Redump, this might take a while..."));

View File

@@ -27,7 +27,7 @@
<PackageReference Include="Microsoft.CodeCoverage" Version="18.0.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
<PackageReference Include="SabreTools.RedumpLib" Version="[1.9.2]" />
<PackageReference Include="SabreTools.RedumpLib" Version="[1.10.0]" />
<PackageReference Include="xunit" Version="2.9.3" />
<PackageReference Include="xunit.abstractions" Version="2.0.3" />
<PackageReference Include="xunit.analyzers" Version="1.27.0" />

View File

@@ -35,7 +35,7 @@
<PackageReference Include="GrindCore.SharpCompress" Version="0.41.1" Condition="!$(TargetFramework.StartsWith(`net2`)) AND !$(TargetFramework.StartsWith(`net3`)) AND !$(TargetFramework.StartsWith(`net40`)) AND !$(TargetFramework.StartsWith(`net452`))" />
<PackageReference Include="SabreTools.Hashing" Version="[1.6.0]" />
<PackageReference Include="SabreTools.IO" Version="[1.9.0]" />
<PackageReference Include="SabreTools.RedumpLib" Version="[1.9.2]" />
<PackageReference Include="SabreTools.RedumpLib" Version="[1.10.0]" />
<PackageReference Include="SabreTools.Serialization" Version="[2.2.1]" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="10.0.0" Condition="!$(TargetFramework.StartsWith(`net2`)) AND !$(TargetFramework.StartsWith(`net3`)) AND !$(TargetFramework.StartsWith(`net40`)) AND !$(TargetFramework.StartsWith(`net452`))" />
</ItemGroup>

View File

@@ -70,7 +70,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="SabreTools.RedumpLib" Version="[1.9.2]" />
<PackageReference Include="SabreTools.RedumpLib" Version="[1.10.0]" />
</ItemGroup>
<ItemGroup>