mirror of
https://github.com/SabreTools/MPF.git
synced 2026-07-02 17:24:48 +00:00
Fix multiple DiscType* for DIC
This commit is contained in:
@@ -164,6 +164,7 @@
|
||||
- Add framework for reported disc type
|
||||
- Add disc type parsing for Aaru and DIC
|
||||
- Fix multiple DiscType for DIC
|
||||
- Fix multiple DiscType* for DIC
|
||||
|
||||
### 2.3 (2022-02-05)
|
||||
- Start overhauling Redump information pulling, again
|
||||
|
||||
@@ -2586,8 +2586,8 @@ namespace MPF.Modules.DiscImageCreator
|
||||
// Trim the line for later use
|
||||
line = line.Trim();
|
||||
|
||||
|
||||
if (line.StartsWith("DiscType"))
|
||||
// Concatenate all found values for each possible line type
|
||||
if (line.StartsWith("DiscType:"))
|
||||
{
|
||||
// DiscType: <discType>
|
||||
if (string.IsNullOrEmpty(discTypeOrBookType))
|
||||
@@ -2595,11 +2595,29 @@ namespace MPF.Modules.DiscImageCreator
|
||||
else
|
||||
discTypeOrBookType += $", {line.Substring("DiscType: ".Length)}";
|
||||
}
|
||||
// Only take the first instance for anything that's not a CD
|
||||
else if (string.IsNullOrEmpty(discTypeOrBookType) && line.StartsWith("BookType"))
|
||||
else if (line.StartsWith("DiscTypeIdentifier:"))
|
||||
{
|
||||
// DiscType: <discType>
|
||||
if (string.IsNullOrEmpty(discTypeOrBookType))
|
||||
discTypeOrBookType = line.Substring("DiscTypeIdentifier: ".Length);
|
||||
else
|
||||
discTypeOrBookType += $", {line.Substring("DiscTypeIdentifier: ".Length)}";
|
||||
}
|
||||
else if (line.StartsWith("DiscTypeSpecific:"))
|
||||
{
|
||||
// DiscType: <discType>
|
||||
if (string.IsNullOrEmpty(discTypeOrBookType))
|
||||
discTypeOrBookType = line.Substring("DiscTypeSpecific: ".Length);
|
||||
else
|
||||
discTypeOrBookType += $", {line.Substring("DiscTypeSpecific: ".Length)}";
|
||||
}
|
||||
else if (line.StartsWith("BookType:"))
|
||||
{
|
||||
// BookType: <discType>
|
||||
discTypeOrBookType = line.Substring("BookType: ".Length);
|
||||
if (string.IsNullOrEmpty(discTypeOrBookType))
|
||||
discTypeOrBookType = line.Substring("BookType: ".Length);
|
||||
else
|
||||
discTypeOrBookType += $", {line.Substring("BookType: ".Length)}";
|
||||
}
|
||||
|
||||
line = sr.ReadLine();
|
||||
|
||||
Reference in New Issue
Block a user