From e1822905e719c8bf0be3a9709e60f79e03b4c329 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Tue, 12 Apr 2022 10:18:52 -0700 Subject: [PATCH] Add multisession helper method skeleton --- CHANGELIST.md | 1 + MPF.Modules/DiscImageCreator/Parameters.cs | 32 ++++++++++++++++++++-- 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/CHANGELIST.md b/CHANGELIST.md index e8caf148..a3e80255 100644 --- a/CHANGELIST.md +++ b/CHANGELIST.md @@ -51,6 +51,7 @@ - Create core UI library - Rename MPF.GUI to MPF.UI - Add multisession pseudo-tag +- Add multisession helper method skeleton ### 2.3 (2022-02-05) - Start overhauling Redump information pulling, again diff --git a/MPF.Modules/DiscImageCreator/Parameters.cs b/MPF.Modules/DiscImageCreator/Parameters.cs index ea75d578..ccd86b2c 100644 --- a/MPF.Modules/DiscImageCreator/Parameters.cs +++ b/MPF.Modules/DiscImageCreator/Parameters.cs @@ -2804,6 +2804,32 @@ namespace MPF.Modules.DiscImageCreator } } + /// + /// Get multisession information from the input file, if possible + /// + /// _disc.txt file location + /// Formatted multisession information, null on error + private static string GetMultisessionInformation(string disc) + { + // If the file doesn't exist, we can't get info from it + if (!File.Exists(disc)) + return null; + + using (StreamReader sr = File.OpenText(disc)) + { + try + { + // TODO: Implement parsing of the disc file + return null; + } + catch + { + // We don't care what the exception is right now + return null; + } + } + } + /// /// Get the hex contents of the PIC file /// @@ -2829,10 +2855,10 @@ namespace MPF.Modules.DiscImageCreator } /// - /// Get the existance of an anti-modchip string from the input file, if possible + /// Get the existence of an anti-modchip string from the input file, if possible /// /// _disc.txt file location - /// Anti-modchip existance if possible, false on error + /// Anti-modchip existence if possible, false on error private static bool GetPlayStationAntiModchipDetected(string disc) { // If the file doesn't exist, we can't get info from it @@ -2923,7 +2949,7 @@ namespace MPF.Modules.DiscImageCreator /// Get the PVD from the input file, if possible /// /// _mainInfo.txt file location - /// Newline-deliminated PVD if possible, null on error + /// Newline-delimited PVD if possible, null on error private static string GetPVD(string mainInfo) { // If the file doesn't exist, we can't get info from it