mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Set metadata on dump.
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
@@ -48,6 +48,7 @@ using DiscImageChef.Devices;
|
||||
using Schemas;
|
||||
using PlatformID = DiscImageChef.CommonTypes.Interop.PlatformID;
|
||||
using TrackType = DiscImageChef.CommonTypes.Enums.TrackType;
|
||||
using Version = DiscImageChef.CommonTypes.Interop.Version;
|
||||
|
||||
// ReSharper disable JoinDeclarationAndInitializer
|
||||
// ReSharper disable InlineOutVariableDeclaration
|
||||
@@ -1036,6 +1037,16 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
|
||||
currentTry.Extents = ExtentsConverter.ToMetadata(extents);
|
||||
|
||||
// TODO: Disc ID
|
||||
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);
|
||||
|
||||
_outputPlugin.SetDumpHardware(_resume.Tries);
|
||||
|
||||
if(_preSidecar != null)
|
||||
|
||||
@@ -1092,6 +1092,15 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
|
||||
currentTry.Extents = ExtentsConverter.ToMetadata(extents);
|
||||
|
||||
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);
|
||||
|
||||
_outputPlugin.SetDumpHardware(_resume.Tries);
|
||||
|
||||
if(_preSidecar != null)
|
||||
|
||||
@@ -48,6 +48,7 @@ using DiscImageChef.Devices;
|
||||
using Schemas;
|
||||
using MediaType = DiscImageChef.CommonTypes.MediaType;
|
||||
using TrackType = DiscImageChef.CommonTypes.Enums.TrackType;
|
||||
using Version = DiscImageChef.CommonTypes.Interop.Version;
|
||||
|
||||
namespace DiscImageChef.Core.Devices.Dumping
|
||||
{
|
||||
@@ -965,6 +966,17 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
|
||||
_outputPlugin.SetDumpHardware(_resume.Tries);
|
||||
|
||||
// TODO: Media Serial Number
|
||||
// TODO: Non-removable drive information
|
||||
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);
|
||||
|
||||
|
||||
@@ -48,6 +48,7 @@ using DiscImageChef.Decoders.SCSI.SSC;
|
||||
using DiscImageChef.Devices;
|
||||
using Schemas;
|
||||
using MediaType = DiscImageChef.CommonTypes.MediaType;
|
||||
using Version = DiscImageChef.CommonTypes.Interop.Version;
|
||||
|
||||
namespace DiscImageChef.Core.Devices.Dumping
|
||||
{
|
||||
@@ -469,7 +470,8 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
ExtentsULong extents = null;
|
||||
|
||||
ResumeSupport.Process(true, _dev.IsRemovable, blocks, _dev.Manufacturer, _dev.Model, _dev.Serial,
|
||||
_dev.PlatformId, ref _resume, ref currentTry, ref extents, _dev.FirmwareRevision, true);
|
||||
_dev.PlatformId, ref _resume, ref currentTry, ref extents, _dev.FirmwareRevision,
|
||||
true);
|
||||
|
||||
if(currentTry == null ||
|
||||
extents == null)
|
||||
@@ -1221,6 +1223,16 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
|
||||
_outputPlugin.SetDumpHardware(_resume.Tries);
|
||||
|
||||
// TODO: Media Serial Number
|
||||
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);
|
||||
|
||||
|
||||
@@ -44,6 +44,7 @@ using DiscImageChef.Core.Logging;
|
||||
using DiscImageChef.Decoders.MMC;
|
||||
using Schemas;
|
||||
using MediaType = DiscImageChef.CommonTypes.MediaType;
|
||||
using Version = DiscImageChef.CommonTypes.Interop.Version;
|
||||
|
||||
namespace DiscImageChef.Core.Devices.Dumping
|
||||
{
|
||||
@@ -523,6 +524,16 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
|
||||
_outputPlugin.SetDumpHardware(_resume.Tries);
|
||||
|
||||
// TODO: Drive info
|
||||
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);
|
||||
|
||||
|
||||
@@ -48,6 +48,7 @@ using DiscImageChef.Devices;
|
||||
using Schemas;
|
||||
using PlatformID = DiscImageChef.CommonTypes.Interop.PlatformID;
|
||||
using TrackType = DiscImageChef.CommonTypes.Enums.TrackType;
|
||||
using Version = DiscImageChef.CommonTypes.Interop.Version;
|
||||
|
||||
namespace DiscImageChef.Core.Devices.Dumping
|
||||
{
|
||||
@@ -1146,6 +1147,15 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
|
||||
_outputPlugin.SetDumpHardware(_resume.Tries);
|
||||
|
||||
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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user