(Hopefully) resolved issues with the media label field
This commit is contained in:
@@ -256,14 +256,6 @@ namespace gaseous_identifier.classes
|
||||
StartToken += 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
gameObject.Roms = new List<objects.RomSignatureObject.Game.Rom>();
|
||||
|
||||
// get the roms
|
||||
@@ -326,12 +318,17 @@ namespace gaseous_identifier.classes
|
||||
|
||||
// check for media label
|
||||
if (token.Length > 0 &&
|
||||
token == gameNameTokens.Last() &&
|
||||
gameNameTokens.Length > 2 &&
|
||||
(token + ")") == gameNameTokens.Last() &&
|
||||
(
|
||||
token != romObject.RomTypeMedia &&
|
||||
token != gameObject.Publisher &&
|
||||
token != gameObject.Country.Key)
|
||||
token != gameObject.Country.Key &&
|
||||
token != gameObject.Copyright.Key &&
|
||||
token != gameObject.Language.Key &&
|
||||
token != gameObject.SystemVariant &&
|
||||
token != gameObject.Video &&
|
||||
token != gameObject.DevelopmentStatus.Key
|
||||
)
|
||||
)
|
||||
{
|
||||
// likely the media label?
|
||||
|
@@ -105,14 +105,23 @@ foreach (string romFile in romPathContents)
|
||||
{
|
||||
foreach (gaseous_identifier.objects.RomSignatureObject.Game.Rom romObject in gameObject.Roms)
|
||||
{
|
||||
if (md5Hash == romObject.Md5)
|
||||
if (romObject.Md5 != null)
|
||||
{
|
||||
if (md5Hash == romObject.Md5.ToLowerInvariant())
|
||||
{
|
||||
// match
|
||||
gameFound = true;
|
||||
Console.WriteLine(romObject.Name);
|
||||
|
||||
gaseous_identifier.objects.RomSignatureObject.Game gameSignature = gameObject;
|
||||
gameSignature.Roms.Clear();
|
||||
gameSignature.Roms.Add(romObject);
|
||||
|
||||
Console.WriteLine(Newtonsoft.Json.JsonConvert.SerializeObject(gameSignature, Newtonsoft.Json.Formatting.Indented));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (gameFound == true) { break; }
|
||||
}
|
||||
if (gameFound == true) { break; }
|
||||
|
@@ -19,6 +19,7 @@
|
||||
<None Remove="Support\Parsers\TOSEC\Language.txt" />
|
||||
<None Remove="Support\Parsers\TOSEC\Copyright.txt" />
|
||||
<None Remove="Support\Parsers\TOSEC\DevelopmentStatus.txt" />
|
||||
<None Remove="Newtonsoft.Json" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Classes\" />
|
||||
@@ -34,4 +35,7 @@
|
||||
<EmbeddedResource Include="Support\Parsers\TOSEC\Copyright.txt" />
|
||||
<EmbeddedResource Include="Support\Parsers\TOSEC\DevelopmentStatus.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
Reference in New Issue
Block a user