Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion MPF.CLI/MPF.CLI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

<ItemGroup>
<PackageReference Include="SabreTools.CommandLine" Version="[1.4.0]" />
<PackageReference Include="SabreTools.RedumpLib" Version="[1.9.1]" />
<PackageReference Include="SabreTools.RedumpLib" Version="[1.9.2]" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion MPF.Check/MPF.Check.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

<ItemGroup>
<PackageReference Include="SabreTools.CommandLine" Version="[1.4.0]" />
<PackageReference Include="SabreTools.RedumpLib" Version="[1.9.1]" />
<PackageReference Include="SabreTools.RedumpLib" Version="[1.9.2]" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -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.1]" />
<PackageReference Include="SabreTools.RedumpLib" Version="[1.9.2]" />
<PackageReference Include="xunit" Version="2.9.3" />
<PackageReference Include="xunit.abstractions" Version="2.0.3" />
<PackageReference Include="xunit.analyzers" Version="1.27.0" />
Expand Down
2 changes: 1 addition & 1 deletion MPF.ExecutionContexts/MPF.ExecutionContexts.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="SabreTools.RedumpLib" Version="[1.9.1]" />
<PackageReference Include="SabreTools.RedumpLib" Version="[1.9.2]" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion MPF.Frontend.Test/MPF.Frontend.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -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.1]" />
<PackageReference Include="SabreTools.RedumpLib" Version="[1.9.2]" />
<PackageReference Include="xunit" Version="2.9.3" />
<PackageReference Include="xunit.abstractions" Version="2.0.3" />
<PackageReference Include="xunit.analyzers" Version="1.27.0" />
Expand Down
2 changes: 1 addition & 1 deletion MPF.Frontend/MPF.Frontend.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -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.1]" />
<PackageReference Include="SabreTools.RedumpLib" Version="[1.9.2]" />
<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>

Expand Down
23 changes: 15 additions & 8 deletions MPF.Frontend/Tools/SubmissionGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -266,12 +266,17 @@ public static async Task<bool> FillFromRedump(Options options,
}

var foundIds = await Validator.ValidateSingleTrack(wc, info, sha1);
if (foundIds is not null && foundIds.Count == 1)
if (foundIds is null)
{
resultProgress?.Report(ResultEventArgs.Failure("Error accessing redump.org"));
return false;
}
else if (foundIds.Count == 0)
resultProgress?.Report(ResultEventArgs.Failure($"No matches found for {sha1}"));
else if (foundIds.Count == 1)
resultProgress?.Report(ResultEventArgs.Success($"Single match found for {sha1}"));
else if (foundIds is not null && foundIds.Count != 1)
resultProgress?.Report(ResultEventArgs.Success($"Multiple matches found for {sha1}"));
else
resultProgress?.Report(ResultEventArgs.Failure($"No matches found for {sha1}"));
resultProgress?.Report(ResultEventArgs.Success($"Multiple matches found for {sha1}"));

// Add the found IDs to the map
foundIdSets.Add(foundIds?.ToArray() ?? []);
Expand Down Expand Up @@ -306,12 +311,14 @@ public static async Task<bool> FillFromRedump(Options options,
{
string sha1 = info.CommonDiscInfo.CommentsSpecialFields[SiteCode.UniversalHash];
var foundIds = await Validator.ValidateUniversalHash(wc, info);
if (foundIds is not null && foundIds.Count == 1)
if (foundIds is null)
resultProgress?.Report(ResultEventArgs.Failure("Error accessing redump.org"));
else if (foundIds.Count == 0)
resultProgress?.Report(ResultEventArgs.Failure($"No matches found for universal hash {sha1}"));
else if (foundIds.Count == 1)
resultProgress?.Report(ResultEventArgs.Success($"Single match found for universal hash {sha1}"));
else if (foundIds is not null && foundIds.Count != 1)
resultProgress?.Report(ResultEventArgs.Success($"Multiple matches found for universal hash {sha1}"));
else
resultProgress?.Report(ResultEventArgs.Failure($"No matches found for universal hash {sha1}"));
resultProgress?.Report(ResultEventArgs.Success($"Multiple matches found for universal hash {sha1}"));

// Ensure that the hash is found
allFound = foundIds is not null && foundIds.Count == 1;
Expand Down
2 changes: 1 addition & 1 deletion MPF.Processors.Test/MPF.Processors.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -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.1]" />
<PackageReference Include="SabreTools.RedumpLib" Version="[1.9.2]" />
<PackageReference Include="xunit" Version="2.9.3" />
<PackageReference Include="xunit.abstractions" Version="2.0.3" />
<PackageReference Include="xunit.analyzers" Version="1.27.0" />
Expand Down
2 changes: 1 addition & 1 deletion MPF.Processors/MPF.Processors.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -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.1]" />
<PackageReference Include="SabreTools.RedumpLib" Version="[1.9.2]" />
<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>
Expand Down
2 changes: 1 addition & 1 deletion MPF.UI/MPF.UI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="SabreTools.RedumpLib" Version="[1.9.1]" />
<PackageReference Include="SabreTools.RedumpLib" Version="[1.9.2]" />
</ItemGroup>

<ItemGroup>
Expand Down
Loading