Set metadata on dump.

This commit is contained in:
2020-01-09 18:01:43 +00:00
parent 5e0b86af82
commit a87c5b24aa
7 changed files with 79 additions and 2 deletions

View File

@@ -44,6 +44,7 @@ using DiscImageChef.Decoders.ATA;
using DiscImageChef.Decoders.PCMCIA;
using Schemas;
using Tuple = DiscImageChef.Decoders.PCMCIA.Tuple;
using Version = DiscImageChef.CommonTypes.Interop.Version;
namespace DiscImageChef.Core.Devices.Dumping
{
@@ -157,7 +158,8 @@ namespace DiscImageChef.Core.Devices.Dumping
ExtentsULong extents = null;
ResumeSupport.Process(ataReader.IsLba, removable, blocks, _dev.Manufacturer, _dev.Model,
_dev.Serial, _dev.PlatformId, ref _resume, ref currentTry, ref extents, _dev.FirmwareRevision);
_dev.Serial, _dev.PlatformId, ref _resume, ref currentTry, ref extents,
_dev.FirmwareRevision);
if(currentTry == null ||
extents == null)
@@ -574,6 +576,16 @@ namespace DiscImageChef.Core.Devices.Dumping
_outputPlugin.SetDumpHardware(_resume.Tries);
// TODO: Non-removable
var metadata = new CommonTypes.Structs.ImageInfo
{
Application = "DiscImageChef", ApplicationVersion = Version.GetVersion()
};
if(!_outputPlugin.SetMetadata(metadata))
ErrorMessage?.Invoke("Error {0} setting metadata, continuing..." + Environment.NewLine +
_outputPlugin.ErrorMessage);
if(_preSidecar != null)
_outputPlugin.SetCicmMetadata(_preSidecar);