diff --git a/gaseous-identifier/Classes/TosecParser.cs b/gaseous-identifier/Classes/TosecParser.cs index c5ddfb9..d09d3f0 100644 --- a/gaseous-identifier/Classes/TosecParser.cs +++ b/gaseous-identifier/Classes/TosecParser.cs @@ -256,14 +256,6 @@ namespace gaseous_identifier.classes StartToken += 1; } - - - - - - - - gameObject.Roms = new List(); // get the roms @@ -326,13 +318,18 @@ 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? romObject.MediaLabel = token; diff --git a/gaseous-identifier/Program.cs b/gaseous-identifier/Program.cs index 7b3dfac..28b556b 100644 --- a/gaseous-identifier/Program.cs +++ b/gaseous-identifier/Program.cs @@ -105,12 +105,21 @@ foreach (string romFile in romPathContents) { foreach (gaseous_identifier.objects.RomSignatureObject.Game.Rom romObject in gameObject.Roms) { - if (md5Hash == romObject.Md5) + if (romObject.Md5 != null) { - // match - gameFound = true; - Console.WriteLine(romObject.Name); - break; + 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; } diff --git a/gaseous-identifier/gaseous-identifier.csproj b/gaseous-identifier/gaseous-identifier.csproj index 50bb812..4b0419b 100644 --- a/gaseous-identifier/gaseous-identifier.csproj +++ b/gaseous-identifier/gaseous-identifier.csproj @@ -19,6 +19,7 @@ + @@ -34,4 +35,7 @@ + + +