mirror of
https://github.com/aaru-dps/Aaru.git
synced 2026-07-08 17:56:18 +00:00
Make Lead-Out dumping optional.
This commit is contained in:
@@ -675,8 +675,9 @@ sealed partial class Dump
|
||||
foreach(int sub in _resume.BadSubchannels) subchannelExtents.Add(sub);
|
||||
|
||||
if(_resume.NextBlock < blocks)
|
||||
for(ulong i = _resume.NextBlock; i < blocks; i++)
|
||||
subchannelExtents.Add((int)i);
|
||||
{
|
||||
for(ulong i = _resume.NextBlock; i < blocks; i++) subchannelExtents.Add((int)i);
|
||||
}
|
||||
}
|
||||
|
||||
if(_resume.NextBlock > 0)
|
||||
@@ -1051,7 +1052,9 @@ sealed partial class Dump
|
||||
smallestPregapLbaPerTrack);
|
||||
}
|
||||
|
||||
if(_omnidrive && outputOptical.OpticalCapabilities.HasFlag(OpticalImageCapabilities.CanStoreOverflowSectors))
|
||||
if(_omnidrive &&
|
||||
outputOptical.OpticalCapabilities.HasFlag(OpticalImageCapabilities.CanStoreOverflowSectors) &&
|
||||
_leadout)
|
||||
{
|
||||
leadOutExtents.Add((ulong)(lastSector + 1), (ulong)(lastSector + 2749));
|
||||
|
||||
@@ -1165,8 +1168,9 @@ sealed partial class Dump
|
||||
supportsLongSectors);
|
||||
|
||||
foreach(Tuple<ulong, ulong> leadoutExtent in leadOutExtents.ToArray())
|
||||
for(ulong e = leadoutExtent.Item1; e <= leadoutExtent.Item2; e++)
|
||||
subchannelExtents.Remove((int)e);
|
||||
{
|
||||
for(ulong e = leadoutExtent.Item1; e <= leadoutExtent.Item2; e++) subchannelExtents.Remove((int)e);
|
||||
}
|
||||
|
||||
if(subchannelExtents.Count > 0 && _retryPasses > 0 && _retrySubchannel)
|
||||
{
|
||||
|
||||
@@ -71,6 +71,7 @@ public partial class Dump
|
||||
const string PREGAP_MODULE_NAME = "Pregap calculator";
|
||||
const string MODULE_NAME = "Media dumping";
|
||||
static readonly TimeSpan _oneSecond = 1.Seconds();
|
||||
readonly bool _absurdSpeed;
|
||||
readonly bool _bypassWiiDecryption;
|
||||
readonly bool _createGraph;
|
||||
readonly bool _cureParanoia;
|
||||
@@ -114,13 +115,13 @@ public partial class Dump
|
||||
readonly Stopwatch _trimStopwatch;
|
||||
readonly Stopwatch _writeStopwatch;
|
||||
bool _aborted;
|
||||
readonly bool _absurdSpeed;
|
||||
int _correctSectors;
|
||||
AaruContext _ctx; // Main database context
|
||||
Database.Models.Device _dbDev; // Device database entry
|
||||
bool _dumpFirstTrackPregap;
|
||||
bool _fixOffset;
|
||||
int _fixedSectors;
|
||||
readonly bool _leadout;
|
||||
uint _maximumReadable; // Maximum number of sectors drive can read at once
|
||||
IMediaGraph _mediaGraph;
|
||||
bool _missingTitleKeysDirty;
|
||||
@@ -190,7 +191,7 @@ public partial class Dump
|
||||
bool generateSubchannels, uint maximumReadable, bool useBufferedReads, bool storeEncrypted,
|
||||
bool titleKeys, uint ignoreCdrRunOuts, bool createGraph, uint dimensions, bool paranoia,
|
||||
bool cureParanoia, bool bypassWiiDecryption, bool startReverse, int errorRecovery, bool hyperSpeed,
|
||||
bool absurdSpeed)
|
||||
bool absurdSpeed, bool leadout)
|
||||
{
|
||||
_doResume = doResume;
|
||||
_dev = dev;
|
||||
@@ -239,6 +240,7 @@ public partial class Dump
|
||||
_errorRecovery = errorRecovery;
|
||||
_hyperSpeed = hyperSpeed;
|
||||
_absurdSpeed = absurdSpeed;
|
||||
_leadout = leadout;
|
||||
_dumpStopwatch = new Stopwatch();
|
||||
_sidecarStopwatch = new Stopwatch();
|
||||
_speedStopwatch = new Stopwatch();
|
||||
|
||||
@@ -765,6 +765,7 @@ public sealed partial class MediaDumpViewModel : ViewModelBase
|
||||
false,
|
||||
0,
|
||||
false,
|
||||
false,
|
||||
false);
|
||||
|
||||
new Thread(DoWork).Start();
|
||||
|
||||
@@ -130,6 +130,7 @@ sealed class DumpMediaCommand : Command<DumpMediaCommand.Settings>
|
||||
AaruLogging.Debug(MODULE_NAME, "--error-recovery={0}", settings.ErrorRecovery);
|
||||
AaruLogging.Debug(MODULE_NAME, "--hyper-speed={0}", settings.HyperSpeed);
|
||||
AaruLogging.Debug(MODULE_NAME, "--absurd-speed={0}", settings.AbsurdSpeed);
|
||||
AaruLogging.Debug(MODULE_NAME, "--lead-out={0}", settings.LeadOut);
|
||||
|
||||
Dictionary<string, string> parsedOptions = Options.Parse(settings.Options);
|
||||
AaruLogging.Debug(MODULE_NAME, UI.Parsed_options);
|
||||
@@ -554,7 +555,8 @@ sealed class DumpMediaCommand : Command<DumpMediaCommand.Settings>
|
||||
settings.StartReverse,
|
||||
settings.ErrorRecovery,
|
||||
settings.HyperSpeed,
|
||||
settings.AbsurdSpeed);
|
||||
settings.AbsurdSpeed,
|
||||
settings.LeadOut);
|
||||
|
||||
AnsiConsole.Progress()
|
||||
.AutoClear(true)
|
||||
@@ -842,6 +844,10 @@ sealed class DumpMediaCommand : Command<DumpMediaCommand.Settings>
|
||||
[DefaultValue(false)]
|
||||
[CommandOption("--absurd-speed")]
|
||||
public bool AbsurdSpeed { get; set; }
|
||||
[Description("Dump Lead-Out sectors if drive and image supports it.")]
|
||||
[DefaultValue(false)]
|
||||
[CommandOption("--lead-out")]
|
||||
public bool LeadOut { get; set; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user