mirror of
https://github.com/SabreTools/MPF.git
synced 2026-07-02 17:24:48 +00:00
Normalize Redumper CSS outputs
This commit is contained in:
@@ -75,6 +75,7 @@
|
||||
- Add support for redumper CD synonyms
|
||||
- Adjust CSS title key parsing
|
||||
- Fix non-reading loop
|
||||
- Normalize Redumper CSS outputs
|
||||
|
||||
### 2.5 (2023-03-12)
|
||||
|
||||
|
||||
@@ -1246,6 +1246,8 @@ namespace MPF.Modules.Redumper
|
||||
if (line.StartsWith("protection system type"))
|
||||
{
|
||||
copyrightProtectionSystemType = line.Substring("protection system type: ".Length);
|
||||
if (copyrightProtectionSystemType == "none")
|
||||
copyrightProtectionSystemType = "No";
|
||||
}
|
||||
else if (line.StartsWith("region management information:"))
|
||||
{
|
||||
@@ -1264,13 +1266,25 @@ namespace MPF.Modules.Redumper
|
||||
{
|
||||
var match = Regex.Match(line, @"^(.*?): (.*?)$");
|
||||
if (match.Success)
|
||||
vobKeys += $"{match.Groups[1].Value} Title Key: {match.Groups[2].Value}\n";
|
||||
{
|
||||
string normalizedKey = match.Groups[2].Value.Replace(':', ' ');
|
||||
if (normalizedKey == "none")
|
||||
normalizedKey = "No Title Key";
|
||||
|
||||
vobKeys += $"{match.Groups[1].Value} Title Key: {match.Groups[2].Value.Replace(':', ' ')}\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
line = sr.ReadLine()?.Trim();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
line = sr.ReadLine()?.Trim();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user