mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Allow to use an existing metadata sidecar when dumping media.
This commit is contained in:
@@ -89,7 +89,9 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
Resume resume, ref DumpLog dumpLog, bool dumpLeadIn,
|
||||
Encoding encoding,
|
||||
string
|
||||
outputPrefix, string outputPath, Dictionary<string, string> formatOptions)
|
||||
outputPrefix, string outputPath, Dictionary<string, string> formatOptions,
|
||||
CICMMetadataType
|
||||
preSidecar)
|
||||
{
|
||||
uint subSize;
|
||||
DateTime start;
|
||||
@@ -887,6 +889,7 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
}
|
||||
|
||||
outputPlugin.SetDumpHardware(resume.Tries);
|
||||
if(preSidecar != null) outputPlugin.SetCicmMetadata(preSidecar);
|
||||
dumpLog.WriteLine("Closing output file.");
|
||||
DicConsole.WriteLine("Closing output file.");
|
||||
outputPlugin.Close();
|
||||
@@ -915,6 +918,12 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
dumpLog.WriteLine("Average checksum speed {0:F3} KiB/sec.",
|
||||
(double)blockSize * (double)(blocks + 1) / 1024 / (totalChkDuration / 1000));
|
||||
|
||||
if(preSidecar == null)
|
||||
{
|
||||
preSidecar.OpticalDisc = sidecar.OpticalDisc;
|
||||
sidecar = preSidecar;
|
||||
}
|
||||
|
||||
sidecar.OpticalDisc[0].Dimensions = Dimensions.DimensionsFromMediaType(dskType);
|
||||
Metadata.MediaType.MediaTypeToString(dskType, out string xmlDskTyp, out string xmlDskSubTyp);
|
||||
sidecar.OpticalDisc[0].DiscType = xmlDskTyp;
|
||||
|
||||
Reference in New Issue
Block a user