diff --git a/CHANGELIST.md b/CHANGELIST.md index 04d5a5e2..070a998a 100644 --- a/CHANGELIST.md +++ b/CHANGELIST.md @@ -5,6 +5,7 @@ - Remove windows from test target - Remove .NET 6.0 from tests, add TODO - Add .NET 6.0 to tests, remove msbuild args +- Add HD-DVD to speed definitions ### 2.4 (2022-10-26) - Update to DIC 20211001 diff --git a/MPF.Core/Data/Constants.cs b/MPF.Core/Data/Constants.cs index c8e7a8ce..25800530 100644 --- a/MPF.Core/Data/Constants.cs +++ b/MPF.Core/Data/Constants.cs @@ -19,6 +19,7 @@ namespace MPF.Core.Data // Private lists of known drive speed ranges private static IReadOnlyList CD { get; } = new List { 1, 2, 3, 4, 6, 8, 12, 16, 20, 24, 32, 40, 44, 48, 52, 56, 72 }; private static IReadOnlyList DVD { get; } = CD.Where(s => s <= 24).ToList(); + private static IReadOnlyList HDDVD { get; } = CD.Where(s => s <= 24).ToList(); private static IReadOnlyList BD { get; } = CD.Where(s => s <= 16).ToList(); private static IReadOnlyList Unknown { get; } = new List { 1 }; @@ -35,10 +36,11 @@ namespace MPF.Core.Data case MediaType.GDROM: return CD; case MediaType.DVD: - case MediaType.HDDVD: case MediaType.NintendoGameCubeGameDisc: case MediaType.NintendoWiiOpticalDisc: return DVD; + case MediaType.HDDVD: + return HDDVD; case MediaType.BluRay: return BD; default: diff --git a/MPF.Core/Data/Options.cs b/MPF.Core/Data/Options.cs index 4c8d8e4f..81c58023 100644 --- a/MPF.Core/Data/Options.cs +++ b/MPF.Core/Data/Options.cs @@ -145,6 +145,15 @@ namespace MPF.Core.Data set { _settings["PreferredDumpSpeedDVD"] = value.ToString(); } } + /// + /// Default HD-DVD dumping speed + /// + public int PreferredDumpSpeedHDDVD + { + get { return GetInt32Setting(_settings, "PreferredDumpSpeedHDDVD", 24); } + set { _settings["PreferredDumpSpeedHDDVD"] = value.ToString(); } + } + /// /// Default BD dumping speed /// diff --git a/MPF/Constants.cs b/MPF/Constants.cs index 12644dcb..63f84856 100644 --- a/MPF/Constants.cs +++ b/MPF/Constants.cs @@ -13,11 +13,13 @@ namespace MPF // Private lists of known drive speed ranges private static IReadOnlyList CD { get; } = new List { 1, 2, 3, 4, 6, 8, 12, 16, 20, 24, 32, 40, 44, 48, 52, 56, 72 }; private static IReadOnlyList DVD { get; } = CD.Where(s => s <= 24).ToList(); + private static IReadOnlyList HDDVD { get; } = CD.Where(s => s <= 24).ToList(); private static IReadOnlyList BD { get; } = CD.Where(s => s <= 16).ToList(); // Create collections for UI based on known drive speeds public static DoubleCollection SpeedsForCDAsCollection { get; } = GetDoubleCollectionFromIntList(CD); public static DoubleCollection SpeedsForDVDAsCollection { get; } = GetDoubleCollectionFromIntList(DVD); + public static DoubleCollection SpeedsForHDDVDAsCollection { get; } = GetDoubleCollectionFromIntList(HDDVD); public static DoubleCollection SpeedsForBDAsCollection { get; } = GetDoubleCollectionFromIntList(BD); private static DoubleCollection GetDoubleCollectionFromIntList(IReadOnlyList list) => new DoubleCollection(list.Select(i => Convert.ToDouble(i)).ToList()); diff --git a/MPF/ViewModels/MainViewModel.cs b/MPF/ViewModels/MainViewModel.cs index 23ca43f2..d3e69d1b 100644 --- a/MPF/ViewModels/MainViewModel.cs +++ b/MPF/ViewModels/MainViewModel.cs @@ -1176,11 +1176,13 @@ namespace MPF.UI.ViewModels speed = App.Options.PreferredDumpSpeedCD; break; case MediaType.DVD: - case MediaType.HDDVD: case MediaType.NintendoGameCubeGameDisc: case MediaType.NintendoWiiOpticalDisc: speed = App.Options.PreferredDumpSpeedDVD; break; + case MediaType.HDDVD: + speed = App.Options.PreferredDumpSpeedHDDVD; + break; case MediaType.BluRay: speed = App.Options.PreferredDumpSpeedBD; break; diff --git a/MPF/Windows/OptionsWindow.xaml b/MPF/Windows/OptionsWindow.xaml index bcff87d2..1fe0e1c3 100644 --- a/MPF/Windows/OptionsWindow.xaml +++ b/MPF/Windows/OptionsWindow.xaml @@ -226,27 +226,35 @@ + -