From d7d0af369c9fa2e70824b02ca797affe91da2089 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Fri, 26 Feb 2021 21:58:10 -0800 Subject: [PATCH] Boilerplate for 3 layer support --- MPF.Library/Utilities/DumpEnvironment.cs | 18 +++++++++++++++++- MPF.Library/Web/SubmissionInfo.cs | 14 +++++++++++++- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/MPF.Library/Utilities/DumpEnvironment.cs b/MPF.Library/Utilities/DumpEnvironment.cs index 65ca1d80..0963761c 100644 --- a/MPF.Library/Utilities/DumpEnvironment.cs +++ b/MPF.Library/Utilities/DumpEnvironment.cs @@ -1063,8 +1063,24 @@ namespace MPF.Utilities // All ringcode information goes in an indented area output.Add(""); output.Add("\tRingcode Information:"); + // If we have a triple-layer disc + if (info.SizeAndChecksums.Layerbreak2 != default) + { + AddIfExists(output, "Layer 0 " + Template.MasteringRingField, info.CommonDiscInfo.MasteringRingFirstLayerDataSide, 2); + AddIfExists(output, "Layer 0 " + Template.MasteringSIDField, info.CommonDiscInfo.MasteringSIDCodeFirstLayerDataSide, 2); + AddIfExists(output, "Layer 0 " + Template.ToolstampField, info.CommonDiscInfo.ToolstampMasteringCodeFirstLayerDataSide, 2); + AddIfExists(output, "Layer 1 " + Template.MasteringRingField, info.CommonDiscInfo.MasteringRingSecondLayerLabelSide, 2); + AddIfExists(output, "Layer 1 " + Template.MasteringSIDField, info.CommonDiscInfo.MasteringSIDCodeSecondLayerLabelSide, 2); + AddIfExists(output, "Layer 1 " + Template.ToolstampField, info.CommonDiscInfo.ToolstampMasteringCodeSecondLayerLabelSide, 2); + AddIfExists(output, "Layer 2 " + Template.MasteringRingField, info.CommonDiscInfo.MasteringRingThirdLayer, 2); + AddIfExists(output, "Layer 2 " + Template.MasteringSIDField, info.CommonDiscInfo.MasteringSIDCodeThirdLayer, 2); + AddIfExists(output, "Layer 2 " + Template.ToolstampField, info.CommonDiscInfo.ToolstampMasteringCodeThirdLayer, 2); + AddIfExists(output, "Data-Side " + Template.MouldSIDField, info.CommonDiscInfo.MouldSIDCodeFirstLayerDataSide, 2); + AddIfExists(output, "Label-Side " + Template.MouldSIDField, info.CommonDiscInfo.MouldSIDCodeSecondLayerLabelSide, 2); + AddIfExists(output, Template.AdditionalMouldField, info.CommonDiscInfo.AdditionalMouldFirstLayerDataSide, 2); + } // If we have a dual-layer disc - if (info.SizeAndChecksums.Layerbreak != default) + else if (info.SizeAndChecksums.Layerbreak != default) { AddIfExists(output, "Inner " + Template.MasteringRingField, info.CommonDiscInfo.MasteringRingFirstLayerDataSide, 2); AddIfExists(output, "Inner " + Template.MasteringSIDField, info.CommonDiscInfo.MasteringSIDCodeFirstLayerDataSide, 2); diff --git a/MPF.Library/Web/SubmissionInfo.cs b/MPF.Library/Web/SubmissionInfo.cs index 52388b2c..f7039446 100644 --- a/MPF.Library/Web/SubmissionInfo.cs +++ b/MPF.Library/Web/SubmissionInfo.cs @@ -146,6 +146,15 @@ namespace MPF.Web [JsonProperty(PropertyName = "dr_ring_0_mo2", NullValueHandling = NullValueHandling.Ignore)] public string AdditionalMouldSecondLayerLabelSide { get; set; } + [JsonProperty(PropertyName = "d_ring_0_ma3", Required = Required.AllowNull)] + public string MasteringRingThirdLayer { get; set; } + + [JsonProperty(PropertyName = "d_ring_0_ma3_sid", NullValueHandling = NullValueHandling.Ignore)] + public string MasteringSIDCodeThirdLayer { get; set; } + + [JsonProperty(PropertyName = "d_ring_0_ts3", NullValueHandling = NullValueHandling.Ignore)] + public string ToolstampMasteringCodeThirdLayer { get; set; } + [JsonProperty(PropertyName = "d_ring_0_offsets", NullValueHandling = NullValueHandling.Ignore)] public string RingOffsetsHidden { get { return "1"; } } @@ -298,13 +307,16 @@ namespace MPF.Web } /// - /// Size & checksums section of New Disc form (DVD/BD/UMD-based) + /// Size & checksums section of New Disc form (DVD/BD/UMD-based) /// public class SizeAndChecksumsSection { [JsonProperty(PropertyName = "d_layerbreak", NullValueHandling = NullValueHandling.Ignore)] public long Layerbreak { get; set; } + [JsonProperty(PropertyName = "d_layerbreak_2", NullValueHandling = NullValueHandling.Ignore)] + public long Layerbreak2 { get; set; } + [JsonProperty(PropertyName = "d_size", NullValueHandling = NullValueHandling.Ignore)] public long Size { get; set; }