diff --git a/CHANGELIST.md b/CHANGELIST.md index 9252f091..faf55c58 100644 --- a/CHANGELIST.md +++ b/CHANGELIST.md @@ -72,6 +72,7 @@ - Initial support for Redumper CSS outputs - Hook up CSS output for testing - Update redumper to build 174 +- Add support for redumper CD synonyms ### 2.5 (2023-03-12) diff --git a/MPF.Modules/Redumper/Constants.cs b/MPF.Modules/Redumper/Constants.cs index 3c9d1ffa..05a91590 100644 --- a/MPF.Modules/Redumper/Constants.cs +++ b/MPF.Modules/Redumper/Constants.cs @@ -7,6 +7,9 @@ namespace MPF.Modules.Redumper { public const string NONE = ""; public const string CD = "cd"; + public const string DVD = "dvd"; // Synonym for CD + public const string BluRay = "bd"; // Synonym for CD + public const string SACD = "sacd"; // Synonym for CD public const string Dump = "dump"; public const string Info = "info"; public const string Protection = "protection"; diff --git a/MPF.Modules/Redumper/Parameters.cs b/MPF.Modules/Redumper/Parameters.cs index d2ef9432..e88b1ed4 100644 --- a/MPF.Modules/Redumper/Parameters.cs +++ b/MPF.Modules/Redumper/Parameters.cs @@ -793,6 +793,9 @@ namespace MPF.Modules.Redumper { return this.BaseCommand == CommandStrings.NONE || this.BaseCommand.Contains(CommandStrings.CD) + || this.BaseCommand.Contains(CommandStrings.DVD) + || this.BaseCommand.Contains(CommandStrings.BluRay) + || this.BaseCommand.Contains(CommandStrings.SACD) || this.BaseCommand.Contains(CommandStrings.Dump); } @@ -840,7 +843,29 @@ namespace MPF.Modules.Redumper return; BaseCommand = CommandStrings.NONE; - ModeValues = new List { CommandStrings.CD }; + switch (this.Type) + { + case MediaType.CDROM: + switch (this.System) + { + case RedumpSystem.SuperAudioCD: + ModeValues = new List { CommandStrings.SACD }; + break; + default: + ModeValues = new List { CommandStrings.CD }; + break; + } + break; + case MediaType.DVD: + ModeValues = new List { CommandStrings.DVD }; + break; + case MediaType.BluRay: + ModeValues = new List { CommandStrings.BluRay }; + break; + default: + BaseCommand = null; + return; + } this[FlagStrings.Drive] = true; DriveValue = driveLetter.ToString(); @@ -907,6 +932,9 @@ namespace MPF.Modules.Redumper switch (part) { case CommandStrings.CD: + case CommandStrings.DVD: + case CommandStrings.BluRay: + case CommandStrings.SACD: case CommandStrings.Dump: case CommandStrings.Protection: case CommandStrings.Refine: