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:
@@ -76,9 +76,10 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
bool force, bool dumpRaw, bool persistent, bool stopOnError,
|
||||
ref Resume resume,
|
||||
ref
|
||||
DumpLog dumpLog, Encoding encoding, string outputPrefix, string outputPath,
|
||||
DumpLog dumpLog, Encoding encoding, string outputPrefix,
|
||||
string outputPath,
|
||||
Dictionary<string, string>
|
||||
formatOptions)
|
||||
formatOptions, CICMMetadataType preSidecar)
|
||||
{
|
||||
bool aborted;
|
||||
|
||||
@@ -391,6 +392,7 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
currentTry.Extents = ExtentsConverter.ToMetadata(extents);
|
||||
|
||||
outputPlugin.SetDumpHardware(resume.Tries);
|
||||
if(preSidecar != null) outputPlugin.SetCicmMetadata(preSidecar);
|
||||
dumpLog.WriteLine("Closing output file.");
|
||||
DicConsole.WriteLine("Closing output file.");
|
||||
outputPlugin.Close();
|
||||
@@ -410,6 +412,12 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
DateTime chkStart = DateTime.UtcNow;
|
||||
CICMMetadataType sidecar = Sidecar.Create(inputPlugin, outputPath, filter.Id, encoding);
|
||||
|
||||
if(preSidecar != null)
|
||||
{
|
||||
preSidecar.BlockMedia = sidecar.BlockMedia;
|
||||
sidecar = preSidecar;
|
||||
}
|
||||
|
||||
switch(dev.Type)
|
||||
{
|
||||
case DeviceType.MMC:
|
||||
|
||||
Reference in New Issue
Block a user