mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Change --no-metadata to --metadata and --no-trim to --trim.
This commit is contained in:
3
.idea/.idea.DiscImageChef/.idea/contentModel.xml
generated
3
.idea/.idea.DiscImageChef/.idea/contentModel.xml
generated
@@ -3,10 +3,8 @@
|
||||
<component name="ContentModelStore">
|
||||
<e p="$APPLICATION_CONFIG_DIR$/consoles/db" t="IncludeRecursive" />
|
||||
<e p="$APPLICATION_PLUGINS_DIR$/puppet/lib/stubs" t="IncludeRecursive" />
|
||||
<e p="$APPLICATION_CONFIG_DIR$/scratches" t="IncludeRecursive" />
|
||||
<e p="$USER_HOME$/.Rider2019.3/system/extResources" t="IncludeRecursive" />
|
||||
<e p="$USER_HOME$/.Rider2019.3/system/resharper-host/local/Transient/ReSharperHost/v193/SolutionCaches/_DiscImageChef.-1491758497.00" t="ExcludeRecursive" />
|
||||
<e p="$USER_HOME$/.config/git/ignore" t="IncludeRecursive" />
|
||||
<e p="$USER_HOME$/.nuget/packages/sqlitepclraw.lib.e_sqlite3.linux/1.1.12/runtimes/linux-x64/native/libe_sqlite3.so" t="Include" />
|
||||
<e p="$PROJECT_DIR$" t="IncludeFlat">
|
||||
<e p=".git/info/exclude" t="IncludeRecursive" />
|
||||
@@ -508,7 +506,6 @@
|
||||
<e p="CIS.cs" t="Include" />
|
||||
<e p="Enums.cs" t="Include" />
|
||||
<e p="Types.cs" t="Include" />
|
||||
<e p="Types.cs~" t="Include" />
|
||||
<e p="VendorCode.cs" t="Include" />
|
||||
</e>
|
||||
<e p="SCSI" t="Include">
|
||||
|
||||
@@ -352,7 +352,7 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
#region Trimming
|
||||
if(_resume.BadBlocks.Count > 0 &&
|
||||
!_aborted &&
|
||||
!_notrim &&
|
||||
_trim &&
|
||||
newTrim)
|
||||
{
|
||||
start = DateTime.UtcNow;
|
||||
@@ -595,7 +595,7 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
|
||||
double totalChkDuration = 0;
|
||||
|
||||
if(!_nometadata)
|
||||
if(_metadata)
|
||||
{
|
||||
_dumpLog.WriteLine("Creating sidecar.");
|
||||
UpdateStatus?.Invoke("Creating sidecar.");
|
||||
|
||||
@@ -962,7 +962,7 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
|
||||
double totalChkDuration = 0;
|
||||
|
||||
if(!_nometadata)
|
||||
if(_metadata)
|
||||
WriteOpticalSidecar(blockSize, blocks, dskType, null, mediaTags, sessions, out totalChkDuration);
|
||||
|
||||
end = DateTime.UtcNow;
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
|
||||
if(_resume.BadBlocks.Count <= 0 ||
|
||||
_aborted ||
|
||||
_notrim ||
|
||||
!_trim ||
|
||||
!newTrim)
|
||||
return;
|
||||
|
||||
|
||||
@@ -31,8 +31,7 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
readonly Encoding _encoding;
|
||||
readonly bool _force;
|
||||
readonly Dictionary<string, string> _formatOptions;
|
||||
readonly bool _nometadata;
|
||||
readonly bool _notrim;
|
||||
readonly bool _metadata;
|
||||
readonly string _outputPath;
|
||||
readonly IWritableImage _outputPlugin;
|
||||
readonly string _outputPrefix;
|
||||
@@ -41,6 +40,7 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
readonly ushort _retryPasses;
|
||||
readonly bool _stopOnError;
|
||||
readonly DumpSubchannel _subchannel;
|
||||
readonly bool _trim;
|
||||
bool _aborted;
|
||||
DicContext _ctx; // Master database context
|
||||
Database.Models.Device _dbDev; // Device database entry
|
||||
@@ -69,15 +69,15 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
/// <param name="encoding">Encoding to use when analyzing dump</param>
|
||||
/// <param name="outputPath">Path to output file</param>
|
||||
/// <param name="formatOptions">Formats to pass to output file plugin</param>
|
||||
/// <param name="notrim">Do not trim errors from skipped sectors</param>
|
||||
/// <param name="trim">Trim errors from skipped sectors</param>
|
||||
/// <param name="dumpFirstTrackPregap">Try to read and dump as much first track pregap as possible</param>
|
||||
/// <param name="preSidecar">Sidecar to store in dumped image</param>
|
||||
/// <param name="skip">How many sectors to skip reading on error</param>
|
||||
/// <param name="nometadata">Create metadata sidecar after dump?</param>
|
||||
/// <param name="metadata">Create metadata sidecar after dump?</param>
|
||||
public Dump(bool doResume, Device dev, string devicePath, IWritableImage outputPlugin, ushort retryPasses,
|
||||
bool force, bool dumpRaw, bool persistent, bool stopOnError, Resume resume, DumpLog dumpLog,
|
||||
Encoding encoding, string outputPrefix, string outputPath, Dictionary<string, string> formatOptions,
|
||||
CICMMetadataType preSidecar, uint skip, bool nometadata, bool notrim, bool dumpFirstTrackPregap,
|
||||
CICMMetadataType preSidecar, uint skip, bool metadata, bool trim, bool dumpFirstTrackPregap,
|
||||
bool fixOffset, bool debug, DumpSubchannel subchannel, int speed)
|
||||
{
|
||||
_doResume = doResume;
|
||||
@@ -97,8 +97,8 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
_formatOptions = formatOptions;
|
||||
_preSidecar = preSidecar;
|
||||
_skip = skip;
|
||||
_nometadata = nometadata;
|
||||
_notrim = notrim;
|
||||
_metadata = metadata;
|
||||
_trim = trim;
|
||||
_dumpFirstTrackPregap = dumpFirstTrackPregap;
|
||||
_aborted = false;
|
||||
_fixOffset = fixOffset;
|
||||
|
||||
@@ -419,7 +419,7 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
#region Trimming
|
||||
if(_resume.BadBlocks.Count > 0 &&
|
||||
!_aborted &&
|
||||
!_notrim &&
|
||||
_trim &&
|
||||
newTrim)
|
||||
{
|
||||
start = DateTime.UtcNow;
|
||||
@@ -651,7 +651,7 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
|
||||
double totalChkDuration = 0;
|
||||
|
||||
if(!_nometadata)
|
||||
if(_metadata)
|
||||
{
|
||||
WriteOpticalSidecar(BLOCK_SIZE, blocks, DSK_TYPE, null, null, 1, out totalChkDuration);
|
||||
}
|
||||
@@ -879,7 +879,7 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
#region Trimming
|
||||
if(_resume.BadBlocks.Count > 0 &&
|
||||
!_aborted &&
|
||||
!_notrim &&
|
||||
_trim &&
|
||||
newTrim)
|
||||
{
|
||||
start = DateTime.UtcNow;
|
||||
@@ -1117,7 +1117,7 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
|
||||
double totalChkDuration = 0;
|
||||
|
||||
if(!_nometadata)
|
||||
if(_metadata)
|
||||
{
|
||||
UpdateStatus?.Invoke("Creating sidecar.");
|
||||
_dumpLog.WriteLine("Creating sidecar.");
|
||||
|
||||
@@ -530,7 +530,7 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
#region Trimming
|
||||
if(_resume.BadBlocks.Count > 0 &&
|
||||
!_aborted &&
|
||||
!_notrim &&
|
||||
_trim &&
|
||||
newTrim)
|
||||
{
|
||||
start = DateTime.UtcNow;
|
||||
@@ -986,7 +986,7 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
|
||||
double totalChkDuration = 0;
|
||||
|
||||
if(!_nometadata)
|
||||
if(_metadata)
|
||||
{
|
||||
// TODO: Layers
|
||||
if(opticalDisc)
|
||||
|
||||
@@ -1250,7 +1250,7 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
|
||||
double totalChkDuration = 0;
|
||||
|
||||
if(!_nometadata)
|
||||
if(_metadata)
|
||||
{
|
||||
UpdateStatus?.Invoke("Creating sidecar.");
|
||||
_dumpLog.WriteLine("Creating sidecar.");
|
||||
|
||||
@@ -415,7 +415,7 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
#region Trimming
|
||||
if(_resume.BadBlocks.Count > 0 &&
|
||||
!_aborted &&
|
||||
!_notrim &&
|
||||
_trim &&
|
||||
newTrim)
|
||||
{
|
||||
start = DateTime.UtcNow;
|
||||
@@ -544,7 +544,7 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
|
||||
double totalChkDuration = 0;
|
||||
|
||||
if(!_nometadata)
|
||||
if(_metadata)
|
||||
{
|
||||
UpdateStatus?.Invoke("Creating sidecar.");
|
||||
_dumpLog.WriteLine("Creating sidecar.");
|
||||
|
||||
@@ -884,7 +884,7 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
#region Trimming
|
||||
if(_resume.BadBlocks.Count > 0 &&
|
||||
!_aborted &&
|
||||
!_notrim &&
|
||||
_trim &&
|
||||
newTrim)
|
||||
{
|
||||
start = DateTime.UtcNow;
|
||||
@@ -1167,7 +1167,7 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
|
||||
double totalChkDuration = 0;
|
||||
|
||||
if(!_nometadata)
|
||||
if(_metadata)
|
||||
{
|
||||
var layers = new LayersType
|
||||
{
|
||||
|
||||
@@ -99,14 +99,14 @@ namespace DiscImageChef.Commands.Media
|
||||
Argument = new Argument<string>(() => null), Required = false
|
||||
});
|
||||
|
||||
Add(new Option("--no-metadata", "Disables creating CICM XML sidecar.")
|
||||
Add(new Option("--metadata", "Enables creating CICM XML sidecar.")
|
||||
{
|
||||
Argument = new Argument<bool>(() => false), Required = false
|
||||
Argument = new Argument<bool>(() => true), Required = false
|
||||
});
|
||||
|
||||
Add(new Option("--no-trim", "Disables trimming errored from skipped sectors.")
|
||||
Add(new Option("--trim", "Enables trimming errored from skipped sectors.")
|
||||
{
|
||||
Argument = new Argument<bool>(() => false), Required = false
|
||||
Argument = new Argument<bool>(() => true), Required = false
|
||||
});
|
||||
|
||||
Add(new Option(new[]
|
||||
@@ -179,8 +179,8 @@ namespace DiscImageChef.Commands.Media
|
||||
}
|
||||
|
||||
public static int Invoke(bool debug, bool verbose, string cicmXml, string devicePath, bool resume,
|
||||
string encoding, bool firstPregap, bool fixOffset, bool force, bool noMetadata,
|
||||
bool noTrim, string outputPath, string options, bool persistent, ushort retryPasses,
|
||||
string encoding, bool firstPregap, bool fixOffset, bool force, bool metadata,
|
||||
bool trim, string outputPath, string options, bool persistent, ushort retryPasses,
|
||||
uint skip, byte speed, bool stopOnError, string format, string subchannel)
|
||||
{
|
||||
MainClass.PrintCopyright();
|
||||
@@ -198,10 +198,10 @@ namespace DiscImageChef.Commands.Media
|
||||
DicConsole.DebugWriteLine("Dump-Media command", "--device={0}", devicePath);
|
||||
DicConsole.DebugWriteLine("Dump-Media command", "--encoding={0}", encoding);
|
||||
DicConsole.DebugWriteLine("Dump-Media command", "--first-pregap={0}", firstPregap);
|
||||
DicConsole.DebugWriteLine("Dump-Media command", "--force={0}", force);
|
||||
DicConsole.DebugWriteLine("Dump-Media command", "--fix-offset={0}", fixOffset);
|
||||
DicConsole.DebugWriteLine("Dump-Media command", "--force={0}", force);
|
||||
DicConsole.DebugWriteLine("Dump-Media command", "--format={0}", format);
|
||||
DicConsole.DebugWriteLine("Dump-Media command", "--no-metadata={0}", noMetadata);
|
||||
DicConsole.DebugWriteLine("Dump-Media command", "--metadata={0}", metadata);
|
||||
DicConsole.DebugWriteLine("Dump-Media command", "--options={0}", options);
|
||||
DicConsole.DebugWriteLine("Dump-Media command", "--output={0}", outputPath);
|
||||
DicConsole.DebugWriteLine("Dump-Media command", "--persistent={0}", persistent);
|
||||
@@ -209,6 +209,7 @@ namespace DiscImageChef.Commands.Media
|
||||
DicConsole.DebugWriteLine("Dump-Media command", "--retry-passes={0}", retryPasses);
|
||||
DicConsole.DebugWriteLine("Dump-Media command", "--skip={0}", skip);
|
||||
DicConsole.DebugWriteLine("Dump-Media command", "--stop-on-error={0}", stopOnError);
|
||||
DicConsole.DebugWriteLine("Dump-Media command", "--trim={0}", trim);
|
||||
DicConsole.DebugWriteLine("Dump-Media command", "--verbose={0}", verbose);
|
||||
DicConsole.DebugWriteLine("Dump-Media command", "--subchannel={0}", subchannel);
|
||||
|
||||
@@ -407,7 +408,7 @@ namespace DiscImageChef.Commands.Media
|
||||
|
||||
var dumper = new Dump(resume, dev, devicePath, outputFormat, retryPasses, force, false, persistent,
|
||||
stopOnError, resumeClass, dumpLog, encodingClass, outputPrefix, outputPath,
|
||||
parsedOptions, sidecar, skip, noMetadata, noTrim, firstPregap, fixOffset, debug,
|
||||
parsedOptions, sidecar, skip, metadata, trim, firstPregap, fixOffset, debug,
|
||||
wantedSubchannel, speed);
|
||||
|
||||
dumper.UpdateStatus += Progress.UpdateStatus;
|
||||
|
||||
Reference in New Issue
Block a user