Enable Bluray dumping with Redumper

This commit is contained in:
Matt Nadareski
2023-10-30 12:45:19 -04:00
parent 7cd100bc53
commit 04d7817d28
4 changed files with 16 additions and 4 deletions

View File

@@ -11,6 +11,7 @@
- Ignore empty protection results
- Remove and Sort Usings
- Update Redumper to build 244
- Enable Bluray dumping with Redumper
### 2.7.3 (2023-10-26)

View File

@@ -93,7 +93,7 @@ namespace MPF.Core.Converters
case InternalProgram.DiscImageCreator:
return "DiscImageCreator";
case InternalProgram.Redumper:
return "redumper";
return "Redumper";
#endregion

View File

@@ -267,6 +267,7 @@ namespace MPF.Core.Modules.Redumper
break;
case MediaType.DVD:
case MediaType.BluRay: // TODO: Confirm that this information outputs
if (!File.Exists($"{basePath}_logs.zip") || !preCheck)
{
if (!File.Exists($"{basePath}.log"))
@@ -376,6 +377,7 @@ namespace MPF.Core.Modules.Redumper
break;
case MediaType.DVD:
case MediaType.BluRay: // TODO: Confirm any differences between outputs
#if NET48
info.Extras.PVD = GetPVD($"{basePath}.log") ?? "Disc has no PVD";
info.TracksAndWriteOffsets.ClrMameProData = GetDatfile($"{basePath}.log");
@@ -397,6 +399,7 @@ namespace MPF.Core.Modules.Redumper
info.SizeAndChecksums.SHA1 = sha1;
}
// TODO: Support multiple layerbreaks when implemented
string layerbreak = GetLayerbreak($"{basePath}.log") ?? string.Empty;
#if NET48
info.SizeAndChecksums.Layerbreak = !string.IsNullOrEmpty(layerbreak) ? Int64.Parse(layerbreak) : default;
@@ -968,6 +971,7 @@ namespace MPF.Core.Modules.Redumper
break;
case MediaType.DVD:
case MediaType.BluRay: // TODO: Confirm that this information outputs
if (File.Exists($"{basePath}.log"))
logFiles.Add($"{basePath}.log");
if (File.Exists($"{basePath}.manufacturer"))
@@ -1044,9 +1048,13 @@ namespace MPF.Core.Modules.Redumper
protected override void SetDefaultParameters(string? drivePath, string filename, int? driveSpeed, Options options)
#endif
{
// If we don't have a CD or DVD, we can't dump using redumper
if (this.Type != MediaType.CDROM && this.Type != MediaType.DVD)
// If we don't have a CD, DVD, or BD, we can't dump using redumper
if (this.Type != MediaType.CDROM
&& this.Type != MediaType.DVD
&& this.Type != MediaType.BluRay)
{
return;
}
BaseCommand = CommandStrings.NONE;
switch (this.Type)
@@ -1632,6 +1640,7 @@ namespace MPF.Core.Modules.Redumper
/// </summary>
/// <param name="log">Log file location</param>
/// <returns>Layerbreak if possible, null on error</returns>
/// <remarks>TODO: Support multiple layerbreaks when added</remarks>
#if NET48
private static string GetLayerbreak(string log)
#else

View File

@@ -167,6 +167,7 @@ namespace MPF.Core.Utilities
case MediaType.CDROM:
case MediaType.DVD:
case MediaType.GDROM:
case MediaType.BluRay:
return true;
// All other formats considered unsupported
@@ -208,7 +209,8 @@ namespace MPF.Core.Utilities
// Formats considered at least partially supported by Redumper
MediaType.CDROM
or MediaType.DVD
or MediaType.GDROM => true,
or MediaType.GDROM
or MediaType.BluRay => true,
// All other formats considered unsupported
_ => false,