Disable layerbreak generation for BD

This commit is contained in:
Matt Nadareski
2022-10-18 16:08:38 -07:00
parent c75d2dcae2
commit ee76d49e56
2 changed files with 15 additions and 12 deletions

View File

@@ -156,6 +156,7 @@
- Change location of dumping info
- Add MS ZipFile package to MPF.Library
- Add + to positive offsets
- Disable layerbreak generation for BD
### 2.3 (2022-02-05)
- Start overhauling Redump information pulling, again

View File

@@ -449,20 +449,22 @@ namespace MPF.Modules.DiscImageCreator
string layerbreak = GetLayerbreak($"{basePath}_disc.txt", System.IsXGD()) ?? "";
info.SizeAndChecksums.Layerbreak = !string.IsNullOrEmpty(layerbreak) ? Int64.Parse(layerbreak) : default;
}
else if (this.Type == MediaType.BluRay)
{
if (GetLayerbreak($"{basePath}_PIC.bin", out long? layerbreak1, out long? layerbreak2, out long? layerbreak3))
{
if (layerbreak1 != null && layerbreak1 * 2048 < info.SizeAndChecksums.Size)
info.SizeAndChecksums.Layerbreak = layerbreak1.Value;
if (layerbreak2 != null && layerbreak2 * 2048 < info.SizeAndChecksums.Size)
info.SizeAndChecksums.Layerbreak2 = layerbreak2.Value;
// TODO: Re-enable this block once Redump accepts layerbreaks for Blu-ray discs
//else if (this.Type == MediaType.BluRay)
//{
// if (GetLayerbreak($"{basePath}_PIC.bin", out long? layerbreak1, out long? layerbreak2, out long? layerbreak3))
// {
// if (layerbreak1 != null && layerbreak1 * 2048 < info.SizeAndChecksums.Size)
// info.SizeAndChecksums.Layerbreak = layerbreak1.Value;
if (layerbreak3 != null && layerbreak3 * 2048 < info.SizeAndChecksums.Size)
info.SizeAndChecksums.Layerbreak3 = layerbreak3.Value;
}
}
// if (layerbreak2 != null && layerbreak2 * 2048 < info.SizeAndChecksums.Size)
// info.SizeAndChecksums.Layerbreak2 = layerbreak2.Value;
// if (layerbreak3 != null && layerbreak3 * 2048 < info.SizeAndChecksums.Size)
// info.SizeAndChecksums.Layerbreak3 = layerbreak3.Value;
// }
//}
// Read the PVD
info.Extras.PVD = GetPVD($"{basePath}_mainInfo.txt") ?? "";