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:
@@ -87,7 +87,8 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
ref Resume resume,
|
||||
ref DumpLog dumpLog,
|
||||
Encoding encoding, string outputPrefix, string outputPath,
|
||||
Dictionary<string, string> formatOptions)
|
||||
Dictionary<string, string> formatOptions,
|
||||
CICMMetadataType preSidecar)
|
||||
{
|
||||
bool sense;
|
||||
ulong blocks;
|
||||
@@ -771,6 +772,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();
|
||||
@@ -794,6 +796,12 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
CICMMetadataType sidecar = Sidecar.Create(inputPlugin, outputPath, filter.Id, encoding);
|
||||
end = DateTime.UtcNow;
|
||||
|
||||
if(preSidecar != null)
|
||||
{
|
||||
preSidecar.OpticalDisc = sidecar.OpticalDisc;
|
||||
sidecar = preSidecar;
|
||||
}
|
||||
|
||||
totalChkDuration = (end - chkStart).TotalMilliseconds;
|
||||
dumpLog.WriteLine("Sidecar created in {0} seconds.", (end - chkStart).TotalSeconds);
|
||||
dumpLog.WriteLine("Average checksum speed {0:F3} KiB/sec.",
|
||||
|
||||
Reference in New Issue
Block a user