diff --git a/CompatBot/EventHandlers/LogParsing/LogParser.LogSections.cs b/CompatBot/EventHandlers/LogParsing/LogParser.LogSections.cs index a11aab92..9d880682 100644 --- a/CompatBot/EventHandlers/LogParsing/LogParser.LogSections.cs +++ b/CompatBot/EventHandlers/LogParsing/LogParser.LogSections.cs @@ -42,7 +42,7 @@ namespace CompatBot.EventHandlers.LogParsing ["Physical device intialized"] = new Regex(@"Physical device intialized\. GPU=(?.+), driver=(?-?\d+)\r?$", DefaultOptions), ["Found vulkan-compatible GPU:"] = new Regex(@"Found vulkan-compatible GPU: (?'(?.+)' running.+)\r?$", DefaultOptions), ["Serial:"] = new Regex(@"Serial: (?[A-z]{4}\d{5})\r?$", DefaultOptions), - ["Successfully installed PS3 firmware"] = new Regex(@"(?Successfully installed PS3 firmware version (?\d+\.\d+)).*\r?$", DefaultOptions), + ["Successfully installed PS3 firmware"] = new Regex(@"(?Successfully installed PS3 firmware) version (?\d+\.\d+).*\r?$", DefaultOptions), ["Title:"] = new Regex(@"Title: (?.*)?\r?$", DefaultOptions), ["Category:"] = new Regex(@"Category: (?.*)?\r?$", DefaultOptions), ["LDR:"] = new Regex(@"(Path|Cache): ((?\w:/)|(?/[^/])).*?\r?$", DefaultOptions), @@ -194,7 +194,7 @@ namespace CompatBot.EventHandlers.LogParsing } state.WipCollection = new NameValueCollection(); Copy( - "build_and_specs", + "build_and_specs", "fw_version_installed", "vulkan_gpu", "d3d_gpu", "driver_version", "driver_manuf", "driver_manuf_new", "driver_version_new", diff --git a/CompatBot/EventHandlers/LogParsing/LogParser.StateMachineGenerator.cs b/CompatBot/EventHandlers/LogParsing/LogParser.StateMachineGenerator.cs index 7058b66b..b5f1c8a2 100644 --- a/CompatBot/EventHandlers/LogParsing/LogParser.StateMachineGenerator.cs +++ b/CompatBot/EventHandlers/LogParsing/LogParser.StateMachineGenerator.cs @@ -50,16 +50,22 @@ namespace CompatBot.EventHandlers.LogParsing foreach (Group group in match.Groups) if (!string.IsNullOrEmpty(group.Name) && group.Name != "0" && !string.IsNullOrWhiteSpace(group.Value)) { + var strValue = group.Value.ToUtf8(); + if (string.IsNullOrEmpty(strValue)) + continue; + Config.Log.Debug($"regex {group.Name} = {group.Value}"); if (MultiValueItems.Contains(group.Name)) { var currentValue = state.WipCollection[group.Name]; if (!string.IsNullOrEmpty(currentValue)) currentValue += Environment.NewLine; - state.WipCollection[group.Name] = currentValue + group.Value.ToUtf8(); + state.WipCollection[group.Name] = currentValue + strValue; } else - state.WipCollection[group.Name] = group.Value.ToUtf8(); + { + state.WipCollection[group.Name] = strValue; + } } } diff --git a/CompatBot/Utils/ResultFormatters/LogParserResultFormatter.CurrentSettingsSections.cs b/CompatBot/Utils/ResultFormatters/LogParserResultFormatter.CurrentSettingsSections.cs index a0a24cbc..b1faa65e 100644 --- a/CompatBot/Utils/ResultFormatters/LogParserResultFormatter.CurrentSettingsSections.cs +++ b/CompatBot/Utils/ResultFormatters/LogParserResultFormatter.CurrentSettingsSections.cs @@ -18,7 +18,9 @@ namespace CompatBot.Utils.ResultFormatters { items["build_branch"] = m.Groups["branch"].Value.Trim(); items["build_commit"] = m.Groups["commit"].Value.Trim(); - items["fw_version_installed"] = m.Groups["fw_version_installed"].Value; + var fwVersion = m.Groups["fw_version_installed"].Value; + if (!string.IsNullOrEmpty(fwVersion)) + items["fw_version_installed"] = fwVersion; items["cpu_model"] = m.Groups["cpu_model"].Value .Replace("(R)", "", StringComparison.InvariantCultureIgnoreCase) .Replace("®", "", StringComparison.InvariantCultureIgnoreCase)