Sync with site code changes

This commit is contained in:
Matt Nadareski
2026-11-14 08:01:01 +01:00
parent b83746070f
commit 3a77bba3af
9 changed files with 51 additions and 4 deletions

View File

@@ -2500,7 +2500,9 @@ namespace SabreTools.RedumpLib.Test.Data
[
SiteCode.PCMacHybrid,
SiteCode.PostgapType,
#pragma warning disable CS0618 // Type or member is obsolete
SiteCode.VCD,
#pragma warning restore CS0618 // Type or member is obsolete
];
/// <summary>
@@ -2527,7 +2529,9 @@ namespace SabreTools.RedumpLib.Test.Data
SiteCode.Genre,
SiteCode.HighSierraVolumeDescriptor,
SiteCode.InternalName,
#pragma warning disable CS0618 // Type or member is obsolete
SiteCode.InternalSerialName,
#pragma warning restore CS0618 // Type or member is obsolete
SiteCode.ISBN,
SiteCode.ISSN,
SiteCode.Multisession,
@@ -2546,9 +2550,13 @@ namespace SabreTools.RedumpLib.Test.Data
SiteCode.SSVersion,
SiteCode.SteamAppID,
SiteCode.TitleID,
#pragma warning disable CS0618 // Type or member is obsolete
SiteCode.VCD,
#pragma warning restore CS0618 // Type or member is obsolete
SiteCode.VETSFBID,
#pragma warning disable CS0618 // Type or member is obsolete
SiteCode.VolumeLabel,
#pragma warning restore CS0618 // Type or member is obsolete
SiteCode.XeMID,
SiteCode.XMID,

View File

@@ -55,6 +55,8 @@ namespace SabreTools.RedumpLib.Test.Data
Version = "Original",
ErrorCount = "0",
EXEDate = "19xx-xx-xx",
InternalSerial = "ISN",
VolumeLabel = "CDROM",
EDC = YesNo.Yes,
Layerbreak = 0,
Layerbreak2 = 1,

View File

@@ -51,6 +51,8 @@ namespace SabreTools.RedumpLib.Test.Tools
Version = "Original",
ErrorCount = "0",
EXEDate = "19xx-xx-xx",
InternalSerial = "ISN",
VolumeLabel = "CDROM",
EDC = YesNo.Yes,
Layerbreak = 0,
Layerbreak2 = 1,
@@ -227,7 +229,7 @@ namespace SabreTools.RedumpLib.Test.Tools
[Fact]
public void FormatOutputData_DiscIdentifiersSection_Formatted()
{
string expected = "Disc Identifiers:\n\tDisc Serials: XXXXXX\n\tEditions: XXXXXX\n\tBarcodes: XXXXXX\n\tVersion: XXXXXX\n\tError Count: XXXXXX\n\tEXE Date: XXXXXX\n\tEDC: Yes\n\tLayerbreak: 1\n\tLayerbreak 2: 2\n\tLayerbreak 3: 3\n\tDisc ID: XXXXXX\n\tDisc Key: XXXXXX\n\tUniversal Hash: XXXXXX\n";
string expected = "Disc Identifiers:\n\tDisc Serials: XXXXXX\n\tEditions: XXXXXX\n\tBarcodes: XXXXXX\n\tVersion: XXXXXX\n\tError Count: XXXXXX\n\tEXE Date: XXXXXX\n\tInternal Serial: XXXXXX\n\tVolume Label: XXXXXX\n\tEDC: Yes\n\tLayerbreak: 1\n\tLayerbreak 2: 2\n\tLayerbreak 3: 3\n\tDisc ID: XXXXXX\n\tDisc Key: XXXXXX\n\tUniversal Hash: XXXXXX\n";
var builder = new StringBuilder();
DiscIdentifiersSection? section = new()
@@ -238,6 +240,8 @@ namespace SabreTools.RedumpLib.Test.Tools
Version = "XXXXXX",
ErrorCount = "XXXXXX",
EXEDate = "XXXXXX",
InternalSerial = "XXXXXX",
VolumeLabel = "XXXXXX",
EDC = YesNo.Yes,
Layerbreak = 1,
Layerbreak2 = 2,
@@ -664,8 +668,8 @@ namespace SabreTools.RedumpLib.Test.Tools
[Fact]
public void FormatSiteTag_BooleanTrue_Formatted()
{
string expected = "[T:VCD]";
SiteCode code = SiteCode.VCD;
string expected = "PC/Mac Hybrid";
SiteCode code = SiteCode.PCMacHybrid;
string value = "True";
string actual = Formatter.FormatSiteTag(code, value);
@@ -675,7 +679,7 @@ namespace SabreTools.RedumpLib.Test.Tools
[Fact]
public void FormatSiteTag_BooleanFalse_Empty()
{
SiteCode code = SiteCode.VCD;
SiteCode code = SiteCode.PCMacHybrid;
string value = "XXXXXX";
string actual = Formatter.FormatSiteTag(code, value);

View File

@@ -57,6 +57,12 @@ namespace SabreTools.RedumpLib.Data
[JsonProperty("exe_date")]
public string? ExeDate { get; set; }
[JsonProperty("internal_serial")]
public string? InternalSerial { get; set; }
[JsonProperty("volume_label")]
public string? VolumeLabel { get; set; }
[JsonProperty("error_count")]
public string? ErrorCount { get; set; }

View File

@@ -28,6 +28,12 @@ namespace SabreTools.RedumpLib.Data.Sections
[JsonProperty(PropertyName = "exe_date", NullValueHandling = NullValueHandling.Ignore)]
public string? EXEDate { get; set; }
[JsonProperty(PropertyName = "internal_serial", NullValueHandling = NullValueHandling.Ignore)]
public string? InternalSerial { get; set; }
[JsonProperty(PropertyName = "volume_label", NullValueHandling = NullValueHandling.Ignore)]
public string? VolumeLabel { get; set; }
[JsonProperty(PropertyName = "edc", NullValueHandling = NullValueHandling.Ignore)]
[JsonConverter(typeof(YesNoConverter))]
public YesNo? EDC { get; set; }
@@ -63,6 +69,8 @@ namespace SabreTools.RedumpLib.Data.Sections
Version = this.Version,
ErrorCount = this.ErrorCount,
EXEDate = this.EXEDate,
InternalSerial = this.InternalSerial,
VolumeLabel = this.VolumeLabel,
EDC = this.EDC,
Layerbreak = this.Layerbreak,
Layerbreak2 = this.Layerbreak2,

View File

@@ -188,6 +188,7 @@ namespace SabreTools.RedumpLib.Data
public static readonly SiteCode InternalName = new("<b>Internal Name</b>:",
isCommentCode: true);
[Obsolete("Use SubmissionInfo.DiscIdentifiers.InternalSerial instead")]
public static readonly SiteCode InternalSerialName = new("<b>Internal Serial</b>:",
code: "[T:ISN]",
isCommentCode: true);
@@ -362,10 +363,12 @@ namespace SabreTools.RedumpLib.Data
isContentCode: true,
isMultiLine: true);
[Obsolete("Use SubmissionInfo.DiscIdentifiers.VolumeLabel instead")]
public static readonly SiteCode VolumeLabel = new("<b>Volume Label</b>:",
code: "[T:VOL]",
isCommentCode: true);
[Obsolete("Code is being removed")]
public static readonly SiteCode VCD = new("<b>V-CD</b>",
code: "[T:VCD]",
isBoolean: true,
@@ -432,7 +435,9 @@ namespace SabreTools.RedumpLib.Data
HighSierraVolumeDescriptor,
InternalName,
#pragma warning disable CS0618 // Type or member is obsolete
InternalSerialName,
#pragma warning restore CS0618 // Type or member is obsolete
InterplayID,
ISBN,
ISSN,
@@ -493,8 +498,10 @@ namespace SabreTools.RedumpLib.Data
ValveID,
VETSFBID,
Videos,
#pragma warning disable CS0618 // Type or member is obsolete
VolumeLabel,
VCD,
#pragma warning restore CS0618 // Type or member is obsolete
XeMID,
XMID,

View File

@@ -41,6 +41,8 @@
public const string VersionField = "Version";
public const string ErrorCountField = "Error Count";
public const string EXEDate = "EXE Date";
public const string InternalSerialField = "Internal Serial";
public const string VolumeLabelField = "Volume Label";
public const string EDCField = "EDC";
public const string LayerbreakField = "Layerbreak";
public const string DiscIDField = "Disc ID";

View File

@@ -505,12 +505,16 @@ namespace SabreTools.RedumpLib.Tools
// Multiple
if (siteCode == SiteCode.HighSierraVolumeDescriptor)
return true;
#pragma warning disable CS0618 // Type or member is obsolete
else if (siteCode == SiteCode.InternalSerialName)
return true;
#pragma warning restore CS0618 // Type or member is obsolete
else if (siteCode == SiteCode.Multisession)
return true;
#pragma warning disable CS0618 // Type or member is obsolete
else if (siteCode == SiteCode.VolumeLabel)
return true;
#pragma warning restore CS0618 // Type or member is obsolete
// Audio CD
if (siteCode == SiteCode.RingPerfectAudioOffset)

View File

@@ -22,8 +22,10 @@ namespace SabreTools.RedumpLib.Tools
#pragma warning restore CS0618 // Type or member is obsolete
SiteCode.EditionNonLatin,
SiteCode.InternalName,
#pragma warning disable CS0618 // Type or member is obsolete
SiteCode.InternalSerialName,
SiteCode.VolumeLabel,
#pragma warning restore CS0618 // Type or member is obsolete
SiteCode.HighSierraVolumeDescriptor,
SiteCode.Multisession,
SiteCode.RingPerfectAudioOffset,
@@ -59,7 +61,9 @@ namespace SabreTools.RedumpLib.Tools
SiteCode.Genre,
SiteCode.Series,
SiteCode.PostgapType,
#pragma warning disable CS0618 // Type or member is obsolete
SiteCode.VCD,
#pragma warning restore CS0618 // Type or member is obsolete
// Publisher / Company IDs
SiteCode.TwoKGamesID,
@@ -311,6 +315,8 @@ namespace SabreTools.RedumpLib.Tools
AddIfExists(output, Template.VersionField, section.Version, 1);
AddIfExists(output, Template.ErrorCountField, section.ErrorCount, 1);
AddIfExists(output, Template.EXEDate, section.EXEDate, 1);
AddIfExists(output, Template.InternalSerialField, section.InternalSerial, 1);
AddIfExists(output, Template.VolumeLabelField, section.VolumeLabel, 1);
if (section.EDC is not null && section.EDC != YesNo.NULL)
AddIfExists(output, Template.EDCField, section.EDC.LongName(), 1);
AddIfExists(output, Template.LayerbreakField, section.Layerbreak, 1);