From fd102cb56b6e2a39a4267ce0bd6057b8a6a1ae33 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Sat, 10 Jun 2023 20:46:54 -0400 Subject: [PATCH] Fix 2-layer DVD support in Redumper --- CHANGELIST.md | 1 + MPF.Modules/Redumper/Parameters.cs | 20 ++++++++++++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/CHANGELIST.md b/CHANGELIST.md index 124ff627..c0916c50 100644 --- a/CHANGELIST.md +++ b/CHANGELIST.md @@ -63,6 +63,7 @@ - Support Redumper DVD layerbreak - Add placeholder and TODOs for Redumper - Add TODO with notes to Redumper +- Fix 2-layer DVD support in Redumper ### 2.5 (2023-03-12) diff --git a/MPF.Modules/Redumper/Parameters.cs b/MPF.Modules/Redumper/Parameters.cs index 2eeb5beb..dd1f7a53 100644 --- a/MPF.Modules/Redumper/Parameters.cs +++ b/MPF.Modules/Redumper/Parameters.cs @@ -223,9 +223,9 @@ namespace MPF.Modules.Redumper { if (!File.Exists($"{basePath}.log")) missingFiles.Add($"{basePath}.log"); - if (!File.Exists($"{basePath}.manufacturer")) + if (!File.Exists($"{basePath}.manufacturer") && !File.Exists($"{basePath}.1.manufacturer") && !File.Exists($"{basePath}.2.manufacturer")) missingFiles.Add($"{basePath}.manufacturer"); - if (!File.Exists($"{basePath}.physical")) + if (!File.Exists($"{basePath}.physical") && !File.Exists($"{basePath}.physical") && !File.Exists($"{basePath}.1.physical") && !File.Exists($"{basePath}.2.physical")) missingFiles.Add($"{basePath}.physical"); if (!File.Exists($"{basePath}.state")) missingFiles.Add($"{basePath}.state"); @@ -427,8 +427,16 @@ namespace MPF.Modules.Redumper info.Artifacts["log"] = GetBase64(GetFullFile($"{basePath}.log")); if (File.Exists($"{basePath}.manufacturer")) info.Artifacts["manufacturer"] = GetBase64(GetFullFile($"{basePath}.manufacturer")); + if (File.Exists($"{basePath}.1.manufacturer")) + info.Artifacts["manufacturer1"] = GetBase64(GetFullFile($"{basePath}.1.manufacturer")); + if (File.Exists($"{basePath}.2.manufacturer")) + info.Artifacts["manufacturer2"] = GetBase64(GetFullFile($"{basePath}.2.manufacturer")); if (File.Exists($"{basePath}.physical")) info.Artifacts["physical"] = GetBase64(GetFullFile($"{basePath}.physical")); + if (File.Exists($"{basePath}.1.physical")) + info.Artifacts["physical1"] = GetBase64(GetFullFile($"{basePath}.1.physical")); + if (File.Exists($"{basePath}.2.physical")) + info.Artifacts["physical2"] = GetBase64(GetFullFile($"{basePath}.2.physical")); // if (File.Exists($"{basePath}.scram")) // info.Artifacts["scram"] = GetBase64(GetFullFile($"{basePath}.scram")); // if (File.Exists($"{basePath}.scrap")) @@ -760,8 +768,16 @@ namespace MPF.Modules.Redumper logFiles.Add($"{basePath}.log"); if (File.Exists($"{basePath}.manufacturer")) logFiles.Add($"{basePath}.manufacturer"); + if (File.Exists($"{basePath}.1.manufacturer")) + logFiles.Add($"{basePath}.1.manufacturer"); + if (File.Exists($"{basePath}.2.manufacturer")) + logFiles.Add($"{basePath}.2.manufacturer"); if (File.Exists($"{basePath}.physical")) logFiles.Add($"{basePath}.physical"); + if (File.Exists($"{basePath}.1.physical")) + logFiles.Add($"{basePath}.1.physical"); + if (File.Exists($"{basePath}.2.physical")) + logFiles.Add($"{basePath}.2.physical"); if (File.Exists($"{basePath}.state")) logFiles.Add($"{basePath}.state"); break;