mirror of
https://github.com/SabreTools/MPF.git
synced 2026-07-02 17:24:48 +00:00
Add Bluray layerbreak support for Redumper
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
- Remove and Sort Usings
|
||||
- Update Redumper to build 244
|
||||
- Enable Bluray dumping with Redumper
|
||||
- Add Bluray layerbreak support for Redumper
|
||||
|
||||
### 2.7.3 (2023-10-26)
|
||||
|
||||
|
||||
@@ -1101,7 +1101,7 @@ namespace MPF.Core.Modules.DiscImageCreator
|
||||
//if (File.Exists($"{basePath}_PFI.bin"))
|
||||
// info.Artifacts["pfi"] = Convert.ToBase64String(File.ReadAllBytes($"{basePath}_PFI.bin")) ?? string.Empty;
|
||||
//if (File.Exists($"{basePath}_PIC.bin"))
|
||||
// info.Artifacts["pfi"] = Convert.ToBase64String(File.ReadAllBytes($"{basePath}_PFI.bin")) ?? string.Empty;
|
||||
// info.Artifacts["pic"] = Convert.ToBase64String(File.ReadAllBytes($"{basePath}_PIC.bin")) ?? string.Empty;
|
||||
//if (File.Exists($"{basePath}_SS.bin"))
|
||||
// info.Artifacts["ss"] = Convert.ToBase64String(File.ReadAllBytes($"{basePath}_SS.bin")) ?? string.Empty;
|
||||
if (File.Exists($"{basePath}.sub"))
|
||||
|
||||
@@ -377,7 +377,7 @@ namespace MPF.Core.Modules.Redumper
|
||||
break;
|
||||
|
||||
case MediaType.DVD:
|
||||
case MediaType.BluRay: // TODO: Confirm any differences between outputs
|
||||
case MediaType.BluRay:
|
||||
#if NET48
|
||||
info.Extras.PVD = GetPVD($"{basePath}.log") ?? "Disc has no PVD";
|
||||
info.TracksAndWriteOffsets.ClrMameProData = GetDatfile($"{basePath}.log");
|
||||
@@ -399,13 +399,37 @@ namespace MPF.Core.Modules.Redumper
|
||||
info.SizeAndChecksums.SHA1 = sha1;
|
||||
}
|
||||
|
||||
// TODO: Support multiple layerbreaks when implemented
|
||||
string layerbreak = GetLayerbreak($"{basePath}.log") ?? string.Empty;
|
||||
// Deal with the layerbreaks
|
||||
if (this.Type == MediaType.DVD)
|
||||
{
|
||||
string layerbreak = GetLayerbreak($"{basePath}.log") ?? string.Empty;
|
||||
#if NET48
|
||||
info.SizeAndChecksums.Layerbreak = !string.IsNullOrEmpty(layerbreak) ? Int64.Parse(layerbreak) : default;
|
||||
info.SizeAndChecksums.Layerbreak = !string.IsNullOrEmpty(layerbreak) ? Int64.Parse(layerbreak) : default;
|
||||
#else
|
||||
info.SizeAndChecksums!.Layerbreak = !string.IsNullOrEmpty(layerbreak) ? Int64.Parse(layerbreak) : default;
|
||||
info.SizeAndChecksums!.Layerbreak = !string.IsNullOrEmpty(layerbreak) ? Int64.Parse(layerbreak) : default;
|
||||
#endif
|
||||
}
|
||||
else if (this.Type == MediaType.BluRay)
|
||||
{
|
||||
var di = InfoTool.GetDiscInformation($"{basePath}.physical");
|
||||
#if NET48
|
||||
info.SizeAndChecksums.PICIdentifier = InfoTool.GetPICIdentifier(di);
|
||||
#else
|
||||
info.SizeAndChecksums!.PICIdentifier = InfoTool.GetPICIdentifier(di);
|
||||
#endif
|
||||
if (InfoTool.GetLayerbreaks(di, 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;
|
||||
|
||||
if (layerbreak3 != null && layerbreak3 * 2048 < info.SizeAndChecksums.Size)
|
||||
info.SizeAndChecksums.Layerbreak3 = layerbreak3.Value;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user