From 1b1ba942474c0c89b39aeb9565bbfe74e316c330 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Wed, 24 Sep 2025 13:33:42 -0400 Subject: [PATCH] Remove reliance on Models library --- SabreTools.RedumpLib.Test/FormatterTests.cs | 4 ++-- SabreTools.RedumpLib.Test/ValidatorTests.cs | 4 ++-- SabreTools.RedumpLib/Formatter.cs | 4 ++-- SabreTools.RedumpLib/SabreTools.RedumpLib.csproj | 1 - SabreTools.RedumpLib/Validator.cs | 5 ++--- 5 files changed, 8 insertions(+), 10 deletions(-) diff --git a/SabreTools.RedumpLib.Test/FormatterTests.cs b/SabreTools.RedumpLib.Test/FormatterTests.cs index 1682d35..bed5c44 100644 --- a/SabreTools.RedumpLib.Test/FormatterTests.cs +++ b/SabreTools.RedumpLib.Test/FormatterTests.cs @@ -556,7 +556,7 @@ namespace SabreTools.RedumpLib.Test string? expected = "BD-ROM-66"; MediaType? mediaType = MediaType.BluRay; - string? picIdentifier = Models.PIC.Constants.DiscTypeIdentifierROMUltra; + string? picIdentifier = "BDU"; long? size = null; long? layerbreak = 12345; long? layerbreak2 = null; @@ -622,7 +622,7 @@ namespace SabreTools.RedumpLib.Test string? expected = "BD-ROM-33"; MediaType? mediaType = MediaType.BluRay; - string? picIdentifier = Models.PIC.Constants.DiscTypeIdentifierROMUltra; + string? picIdentifier = "BDU"; long? size = null; long? layerbreak = null; long? layerbreak2 = null; diff --git a/SabreTools.RedumpLib.Test/ValidatorTests.cs b/SabreTools.RedumpLib.Test/ValidatorTests.cs index 80219ab..af1794c 100644 --- a/SabreTools.RedumpLib.Test/ValidatorTests.cs +++ b/SabreTools.RedumpLib.Test/ValidatorTests.cs @@ -143,7 +143,7 @@ namespace SabreTools.RedumpLib.Test SizeAndChecksums = new SizeAndChecksumsSection { Layerbreak = 12345, - PICIdentifier = Models.PIC.Constants.DiscTypeIdentifierROMUltra, + PICIdentifier = "BDU", }, }; @@ -213,7 +213,7 @@ namespace SabreTools.RedumpLib.Test CommonDiscInfo = new CommonDiscInfoSection { Media = type }, SizeAndChecksums = new SizeAndChecksumsSection { - PICIdentifier = Models.PIC.Constants.DiscTypeIdentifierROMUltra, + PICIdentifier = "BDU", }, }; diff --git a/SabreTools.RedumpLib/Formatter.cs b/SabreTools.RedumpLib/Formatter.cs index 6301bba..7db1a89 100644 --- a/SabreTools.RedumpLib/Formatter.cs +++ b/SabreTools.RedumpLib/Formatter.cs @@ -687,13 +687,13 @@ namespace SabreTools.RedumpLib return $"{mediaType.LongName()}-128"; else if (layerbreak2 != default && layerbreak2 != default(long)) return $"{mediaType.LongName()}-100"; - else if (layerbreak != default && layerbreak != default(long) && picIdentifier == Models.PIC.Constants.DiscTypeIdentifierROMUltra) + else if (layerbreak != default && layerbreak != default(long) && picIdentifier == "BDU") return $"{mediaType.LongName()}-66"; else if (layerbreak != default && layerbreak != default(long) && size > 53_687_063_712) return $"{mediaType.LongName()}-66"; else if (layerbreak != default && layerbreak != default(long)) return $"{mediaType.LongName()}-50"; - else if (picIdentifier == Models.PIC.Constants.DiscTypeIdentifierROMUltra) + else if (picIdentifier == "BDU") return $"{mediaType.LongName()}-33"; else if (size > 26_843_531_856) return $"{mediaType.LongName()}-33"; diff --git a/SabreTools.RedumpLib/SabreTools.RedumpLib.csproj b/SabreTools.RedumpLib/SabreTools.RedumpLib.csproj index 03ce9d5..abb726e 100644 --- a/SabreTools.RedumpLib/SabreTools.RedumpLib.csproj +++ b/SabreTools.RedumpLib/SabreTools.RedumpLib.csproj @@ -34,7 +34,6 @@ - \ No newline at end of file diff --git a/SabreTools.RedumpLib/Validator.cs b/SabreTools.RedumpLib/Validator.cs index 4f97094..f26ff71 100644 --- a/SabreTools.RedumpLib/Validator.cs +++ b/SabreTools.RedumpLib/Validator.cs @@ -39,13 +39,13 @@ namespace SabreTools.RedumpLib info.CommonDiscInfo.Media = DiscType.BD128; else if (info.SizeAndChecksums.Layerbreak2 != default) info.CommonDiscInfo.Media = DiscType.BD100; - else if (info.SizeAndChecksums.Layerbreak != default && info.SizeAndChecksums.PICIdentifier == Models.PIC.Constants.DiscTypeIdentifierROMUltra) + else if (info.SizeAndChecksums.Layerbreak != default && info.SizeAndChecksums.PICIdentifier == "BDU") info.CommonDiscInfo.Media = DiscType.BD66; else if (info.SizeAndChecksums.Layerbreak != default && info.SizeAndChecksums.Size > 50_050_629_632) info.CommonDiscInfo.Media = DiscType.BD66; else if (info.SizeAndChecksums.Layerbreak != default) info.CommonDiscInfo.Media = DiscType.BD50; - else if (info.SizeAndChecksums.PICIdentifier == Models.PIC.Constants.DiscTypeIdentifierROMUltra) + else if (info.SizeAndChecksums.PICIdentifier == "BDU") info.CommonDiscInfo.Media = DiscType.BD33; else if (info.SizeAndChecksums.Size > 25_025_314_816) info.CommonDiscInfo.Media = DiscType.BD33; @@ -157,7 +157,6 @@ namespace SabreTools.RedumpLib /// /// RedumpClient for making the connection /// Existing SubmissionInfo object to fill - /// Optional result progress callback /// List of found values, if possible public async static Task?> ValidateUniversalHash(RedumpClient rc, SubmissionInfo info) {