mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Move all localizable strings from Aaru.Core project to resources.
This commit is contained in:
@@ -170,8 +170,8 @@ partial class Dump
|
||||
|
||||
if(cdiReadyReadAsAudio)
|
||||
{
|
||||
_dumpLog.WriteLine("Setting speed to 8x for CD-i Ready reading as audio.");
|
||||
UpdateStatus?.Invoke("Setting speed to 8x for CD-i Ready reading as audio.");
|
||||
_dumpLog.WriteLine(Localization.Core.Setting_speed_to_8x_for_CD_i_Ready_reading_as_audio);
|
||||
UpdateStatus?.Invoke(Localization.Core.Setting_speed_to_8x_for_CD_i_Ready_reading_as_audio);
|
||||
|
||||
_dev.SetCdSpeed(out _, RotationalControl.ClvAndImpureCav, 1416, 0, _dev.Timeout, out _);
|
||||
}
|
||||
@@ -183,8 +183,8 @@ partial class Dump
|
||||
if(_aborted)
|
||||
{
|
||||
currentTry.Extents = ExtentsConverter.ToMetadata(extents);
|
||||
UpdateStatus?.Invoke("Aborted!");
|
||||
_dumpLog.WriteLine("Aborted!");
|
||||
UpdateStatus?.Invoke(Localization.Core.Aborted);
|
||||
_dumpLog.WriteLine(Localization.Core.Aborted);
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -213,8 +213,9 @@ partial class Dump
|
||||
currentSpeed > 0)
|
||||
minSpeed = currentSpeed;
|
||||
|
||||
UpdateProgress?.Invoke($"Reading sector {i} of {blocks} ({currentSpeed:F3} MiB/sec.)", (long)i,
|
||||
(long)blocks);
|
||||
UpdateProgress?.
|
||||
Invoke(string.Format(Localization.Core.Reading_sector_0_of_1_2_MiB_sec, i, blocks, currentSpeed),
|
||||
(long)i, (long)blocks);
|
||||
|
||||
sense = _dev.ReadCd(out cmdBuf, out senseBuf, firstSectorToRead, blockSize, blocksToRead,
|
||||
MmcSectorTypes.AllTypes, false, false, true, MmcHeaderCodes.AllHeaders, true, true,
|
||||
@@ -228,8 +229,9 @@ partial class Dump
|
||||
if(sense)
|
||||
for(uint r = 0; r < _maximumReadable; r++)
|
||||
{
|
||||
UpdateProgress?.Invoke($"Reading sector {i + r} of {blocks} ({currentSpeed:F3} MiB/sec.)",
|
||||
(long)i + r, (long)blocks);
|
||||
UpdateProgress?.
|
||||
Invoke(string.Format(Localization.Core.Reading_sector_0_of_1_2_MiB_sec, i + r, blocks, currentSpeed),
|
||||
(long)i + r, (long)blocks);
|
||||
|
||||
sense = _dev.ReadCd(out cmdBuf, out senseBuf, (uint)(i + r), blockSize, (uint)sectorsForOffset + 1,
|
||||
MmcSectorTypes.AllTypes, false, false, true, MmcHeaderCodes.AllHeaders, true,
|
||||
@@ -289,10 +291,11 @@ partial class Dump
|
||||
|
||||
leadOutExtents.Add(i + r, firstTrack.EndSector);
|
||||
|
||||
UpdateStatus?.Invoke($"Adding CD-i Ready hole from LBA {i + r} to {firstTrack.EndSector
|
||||
} inclusive.");
|
||||
UpdateStatus?.
|
||||
Invoke(string.Format(Localization.Core.Adding_CD_i_Ready_hole_from_LBA_0_to_1_inclusive,
|
||||
i + r, firstTrack.EndSector));
|
||||
|
||||
_dumpLog.WriteLine("Adding CD-i Ready hole from LBA {0} to {1} inclusive.", i + r,
|
||||
_dumpLog.WriteLine(Localization.Core.Adding_CD_i_Ready_hole_from_LBA_0_to_1_inclusive, i + r,
|
||||
firstTrack.EndSector);
|
||||
|
||||
break;
|
||||
|
||||
@@ -130,8 +130,8 @@ partial class Dump
|
||||
if(_aborted)
|
||||
{
|
||||
currentTry.Extents = ExtentsConverter.ToMetadata(extents);
|
||||
UpdateStatus?.Invoke("Aborted!");
|
||||
_dumpLog.WriteLine("Aborted!");
|
||||
UpdateStatus?.Invoke(Localization.Core.Aborted);
|
||||
_dumpLog.WriteLine(Localization.Core.Aborted);
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -224,8 +224,8 @@ partial class Dump
|
||||
switch(inData)
|
||||
{
|
||||
case false when currentReadSpeed == 0xFFFF:
|
||||
_dumpLog.WriteLine("Setting speed to 8x for audio reading.");
|
||||
UpdateStatus?.Invoke("Setting speed to 8x for audio reading.");
|
||||
_dumpLog.WriteLine(Localization.Core.Setting_speed_to_8x_for_audio_reading);
|
||||
UpdateStatus?.Invoke(Localization.Core.Setting_speed_to_8x_for_audio_reading);
|
||||
|
||||
_dev.SetCdSpeed(out _, RotationalControl.ClvAndImpureCav, 1416, 0, _dev.Timeout, out _);
|
||||
|
||||
@@ -234,11 +234,13 @@ partial class Dump
|
||||
break;
|
||||
case true when currentReadSpeed != _speed:
|
||||
{
|
||||
_dumpLog.WriteLine($"Setting speed to {(_speed == 0xFFFF ? "MAX for data reading" : $"{_speed}x")
|
||||
}.");
|
||||
_dumpLog.WriteLine(_speed == 0xFFFF ? Localization.Core.Setting_speed_to_MAX_for_data_reading
|
||||
: string.Format(Localization.Core.Setting_speed_to_0_x_for_data_reading,
|
||||
_speed));
|
||||
|
||||
UpdateStatus?.Invoke($"Setting speed to {(_speed == 0xFFFF ? "MAX for data reading" : $"{_speed}x")
|
||||
}.");
|
||||
UpdateStatus?.Invoke(_speed == 0xFFFF ? Localization.Core.Setting_speed_to_MAX_for_data_reading
|
||||
: string.Format(Localization.Core.Setting_speed_to_0_x_for_data_reading,
|
||||
_speed));
|
||||
|
||||
_speed *= _speedMultiplier;
|
||||
|
||||
@@ -268,8 +270,9 @@ partial class Dump
|
||||
currentSpeed > 0)
|
||||
minSpeed = currentSpeed;
|
||||
|
||||
UpdateProgress?.Invoke($"Reading sector {i} of {blocks} ({currentSpeed:F3} MiB/sec.)", (long)i,
|
||||
(long)blocks);
|
||||
UpdateProgress?.
|
||||
Invoke(string.Format(Localization.Core.Reading_sector_0_of_1_2_MiB_sec, i, blocks, currentSpeed),
|
||||
(long)i, (long)blocks);
|
||||
|
||||
if(crossingLeadOut &&
|
||||
failedCrossingLeadOut &&
|
||||
@@ -419,8 +422,9 @@ partial class Dump
|
||||
{
|
||||
for(uint r = 0; r < blocksToRead; r++)
|
||||
{
|
||||
UpdateProgress?.Invoke($"Reading sector {i + r} of {blocks} ({currentSpeed:F3} MiB/sec.)",
|
||||
(long)i + r, (long)blocks);
|
||||
UpdateProgress?.
|
||||
Invoke(string.Format(Localization.Core.Reading_sector_0_of_1_2_MiB_sec, i + r, blocks, currentSpeed),
|
||||
(long)i + r, (long)blocks);
|
||||
|
||||
if(_supportsPlextorD8)
|
||||
{
|
||||
@@ -585,11 +589,13 @@ partial class Dump
|
||||
|
||||
_resume.BadBlocks.Add(i + r);
|
||||
|
||||
AaruConsole.DebugWriteLine("Dump-Media", "READ error:\n{0}", Sense.PrettifySense(senseBuf));
|
||||
AaruConsole.DebugWriteLine("Dump-Media", Localization.Core.READ_error_0,
|
||||
Sense.PrettifySense(senseBuf));
|
||||
|
||||
mhddLog.Write(i + r, cmdDuration < 500 ? 65535 : cmdDuration);
|
||||
|
||||
ibgLog.Write(i + r, 0);
|
||||
_dumpLog.WriteLine("Skipping {0} blocks from errored block {1}.", 1, i + r);
|
||||
ibgLog.Write(i + r, 0);
|
||||
_dumpLog.WriteLine(Localization.Core.Skipping_0_blocks_from_errored_block_1, 1, i + r);
|
||||
newTrim = true;
|
||||
}
|
||||
|
||||
@@ -761,11 +767,11 @@ partial class Dump
|
||||
for(ulong b = i; b < i + _skip; b++)
|
||||
_resume.BadBlocks.Add(b);
|
||||
|
||||
AaruConsole.DebugWriteLine("Dump-Media", "READ error:\n{0}", Sense.PrettifySense(senseBuf));
|
||||
AaruConsole.DebugWriteLine("Dump-Media", Localization.Core.READ_error_0, Sense.PrettifySense(senseBuf));
|
||||
mhddLog.Write(i, cmdDuration < 500 ? 65535 : cmdDuration);
|
||||
|
||||
ibgLog.Write(i, 0);
|
||||
_dumpLog.WriteLine("Skipping {0} blocks from errored block {1}.", _skip, i);
|
||||
_dumpLog.WriteLine(Localization.Core.Skipping_0_blocks_from_errored_block_1, _skip, i);
|
||||
i += _skip - blocksToRead;
|
||||
newTrim = true;
|
||||
}
|
||||
@@ -791,7 +797,7 @@ partial class Dump
|
||||
if(!failedCrossingLeadOut)
|
||||
return;
|
||||
|
||||
_dumpLog.WriteLine("Failed crossing into Lead-Out, dump may not be correct.");
|
||||
UpdateStatus?.Invoke("Failed crossing into Lead-Out, dump may not be correct.");
|
||||
_dumpLog.WriteLine(Localization.Core.Failed_crossing_into_Lead_Out);
|
||||
UpdateStatus?.Invoke(Localization.Core.Failed_crossing_into_Lead_Out);
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -181,8 +181,8 @@ partial class Dump
|
||||
md6 = Modes.EncodeMode6(md, _dev.ScsiType);
|
||||
md10 = Modes.EncodeMode10(md, _dev.ScsiType);
|
||||
|
||||
UpdateStatus?.Invoke("Sending MODE SELECT to drive (return damaged blocks).");
|
||||
_dumpLog.WriteLine("Sending MODE SELECT to drive (return damaged blocks).");
|
||||
UpdateStatus?.Invoke(Localization.Core.Sending_MODE_SELECT_to_drive_return_damaged_blocks);
|
||||
_dumpLog.WriteLine(Localization.Core.Sending_MODE_SELECT_to_drive_return_damaged_blocks);
|
||||
sense = _dev.ModeSelect(md6, out senseBuf, true, false, _dev.Timeout, out _);
|
||||
|
||||
if(sense)
|
||||
@@ -190,12 +190,13 @@ partial class Dump
|
||||
|
||||
if(sense)
|
||||
{
|
||||
UpdateStatus?.
|
||||
Invoke("Drive did not accept MODE SELECT command for persistent error reading, try another drive.");
|
||||
UpdateStatus?.Invoke(Localization.Core.
|
||||
Drive_did_not_accept_MODE_SELECT_command_for_persistent_error_reading);
|
||||
|
||||
AaruConsole.DebugWriteLine("Error: {0}", Sense.PrettifySense(senseBuf));
|
||||
AaruConsole.DebugWriteLine(Localization.Core.Error_0, Sense.PrettifySense(senseBuf));
|
||||
|
||||
_dumpLog.WriteLine("Drive did not accept MODE SELECT command for persistent error reading, try another drive.");
|
||||
_dumpLog.WriteLine(Localization.Core.
|
||||
Drive_did_not_accept_MODE_SELECT_command_for_persistent_error_reading);
|
||||
}
|
||||
else
|
||||
runningPersistent = true;
|
||||
@@ -213,14 +214,25 @@ partial class Dump
|
||||
if(_aborted)
|
||||
{
|
||||
currentTry.Extents = ExtentsConverter.ToMetadata(extents);
|
||||
_dumpLog.WriteLine("Aborted!");
|
||||
_dumpLog.WriteLine(Localization.Core.Aborted);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
PulseProgress?.Invoke(string.Format("Retrying sector {0}, pass {1}, {3}{2}", badSector, pass,
|
||||
forward ? "forward" : "reverse",
|
||||
runningPersistent ? "recovering partial data, " : ""));
|
||||
if(forward)
|
||||
PulseProgress?.Invoke(runningPersistent
|
||||
? string.
|
||||
Format(Localization.Core.Retrying_sector_0_pass_1_recovering_partial_data_forward,
|
||||
badSector, pass)
|
||||
: string.Format(Localization.Core.Retrying_sector_0_pass_1_forward, badSector,
|
||||
pass));
|
||||
else
|
||||
PulseProgress?.Invoke(runningPersistent
|
||||
? string.
|
||||
Format(Localization.Core.Retrying_sector_0_pass_1_recovering_partial_data_reverse,
|
||||
badSector, pass)
|
||||
: string.Format(Localization.Core.Retrying_sector_0_pass_1_reverse, badSector,
|
||||
pass));
|
||||
|
||||
Track track = tracks.OrderBy(t => t.StartSector).LastOrDefault(t => badSector >= t.StartSector);
|
||||
|
||||
@@ -327,8 +339,11 @@ partial class Dump
|
||||
{
|
||||
_resume.BadBlocks.Remove(badSector);
|
||||
extents.Add(badSector);
|
||||
UpdateStatus?.Invoke($"Correctly retried sector {badSector} in pass {pass}.");
|
||||
_dumpLog.WriteLine("Correctly retried sector {0} in pass {1}.", badSector, pass);
|
||||
|
||||
UpdateStatus?.Invoke(string.Format(Localization.Core.Correctly_retried_sector_0_in_pass_1, badSector,
|
||||
pass));
|
||||
|
||||
_dumpLog.WriteLine(Localization.Core.Correctly_retried_sector_0_in_pass_1, badSector, pass);
|
||||
sectorsNotEvenPartial.Remove(badSector);
|
||||
}
|
||||
else
|
||||
@@ -421,7 +436,7 @@ partial class Dump
|
||||
md6 = Modes.EncodeMode6(md, _dev.ScsiType);
|
||||
md10 = Modes.EncodeMode10(md, _dev.ScsiType);
|
||||
|
||||
_dumpLog.WriteLine("Sending MODE SELECT to drive (ignore error correction).");
|
||||
_dumpLog.WriteLine(Localization.Core.Sending_MODE_SELECT_to_drive_ignore_error_correction);
|
||||
sense = _dev.ModeSelect(md6, out senseBuf, true, false, _dev.Timeout, out _);
|
||||
|
||||
if(sense)
|
||||
@@ -440,12 +455,13 @@ partial class Dump
|
||||
if(_aborted)
|
||||
{
|
||||
currentTry.Extents = ExtentsConverter.ToMetadata(extents);
|
||||
_dumpLog.WriteLine("Aborted!");
|
||||
_dumpLog.WriteLine(Localization.Core.Aborted);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
PulseProgress?.Invoke($"Trying to get partial data for sector {badSector}");
|
||||
PulseProgress?.Invoke(string.Format(Localization.Core.Trying_to_get_partial_data_for_sector_0,
|
||||
badSector));
|
||||
|
||||
Track track = tracks.OrderBy(t => t.StartSector).LastOrDefault(t => badSector >= t.StartSector);
|
||||
|
||||
@@ -466,7 +482,7 @@ partial class Dump
|
||||
continue;
|
||||
}
|
||||
|
||||
_dumpLog.WriteLine("Got partial data for sector {0} in pass {1}.", badSector, pass);
|
||||
_dumpLog.WriteLine(Localization.Core.Got_partial_data_for_sector_0_in_pass_1, badSector, pass);
|
||||
|
||||
if(supportedSubchannel != MmcSubchannel.None)
|
||||
{
|
||||
@@ -519,7 +535,7 @@ partial class Dump
|
||||
md6 = Modes.EncodeMode6(md, _dev.ScsiType);
|
||||
md10 = Modes.EncodeMode10(md, _dev.ScsiType);
|
||||
|
||||
_dumpLog.WriteLine("Sending MODE SELECT to drive (return device to previous status).");
|
||||
_dumpLog.WriteLine(Localization.Core.Sending_MODE_SELECT_to_drive_return_device_to_previous_status);
|
||||
sense = _dev.ModeSelect(md6, out senseBuf, true, false, _dev.Timeout, out _);
|
||||
|
||||
if(sense)
|
||||
@@ -592,13 +608,16 @@ partial class Dump
|
||||
|
||||
if(_aborted)
|
||||
{
|
||||
_dumpLog.WriteLine("Aborted!");
|
||||
_dumpLog.WriteLine(Localization.Core.Aborted);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
PulseProgress?.Invoke($"Retrying sector {badSector} subchannel, pass {pass}, {
|
||||
(forward ? "forward" : "reverse")}");
|
||||
PulseProgress?.Invoke(forward
|
||||
? string.Format(Localization.Core.Retrying_sector_0_subchannel_pass_1_forward,
|
||||
badSector, pass)
|
||||
: string.Format(Localization.Core.Retrying_sector_0_subchannel_pass_1_reverse,
|
||||
badSector, pass));
|
||||
|
||||
uint startSector = badSector - 2;
|
||||
|
||||
@@ -635,8 +654,10 @@ partial class Dump
|
||||
if(subchannelExtents.Contains(bs))
|
||||
continue;
|
||||
|
||||
UpdateStatus?.Invoke($"Correctly retried sector {badSector} subchannel in pass {pass}.");
|
||||
_dumpLog.WriteLine("Correctly retried sector {0} subchannel in pass {1}.", badSector, pass);
|
||||
UpdateStatus?.Invoke(string.Format(Localization.Core.Correctly_retried_sector_0_subchannel_in_pass_1,
|
||||
badSector, pass));
|
||||
|
||||
_dumpLog.WriteLine(Localization.Core.Correctly_retried_sector_0_subchannel_in_pass_1, badSector, pass);
|
||||
}
|
||||
|
||||
if(pass < _retryPasses &&
|
||||
|
||||
@@ -93,8 +93,8 @@ partial class Dump
|
||||
byte[] senseBuf = null;
|
||||
var outputOptical = _outputPlugin as IWritableOpticalImage;
|
||||
|
||||
UpdateStatus?.Invoke("Reading lead-outs");
|
||||
_dumpLog.WriteLine("Reading lead-outs");
|
||||
UpdateStatus?.Invoke(Localization.Core.Reading_lead_outs);
|
||||
_dumpLog.WriteLine(Localization.Core.Reading_lead_outs);
|
||||
|
||||
InitProgress?.Invoke();
|
||||
|
||||
@@ -104,7 +104,7 @@ partial class Dump
|
||||
if(_aborted)
|
||||
{
|
||||
currentTry.Extents = ExtentsConverter.ToMetadata(extents);
|
||||
_dumpLog.WriteLine("Aborted!");
|
||||
_dumpLog.WriteLine(Localization.Core.Aborted);
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -119,7 +119,8 @@ partial class Dump
|
||||
currentSpeed > 0)
|
||||
minSpeed = currentSpeed;
|
||||
|
||||
PulseProgress?.Invoke($"Reading sector {i} at lead-out ({currentSpeed:F3} MiB/sec.)");
|
||||
PulseProgress?.Invoke(string.Format(Localization.Core.Reading_sector_0_at_lead_out_1_MiB_sec, i,
|
||||
currentSpeed));
|
||||
|
||||
if(readcd)
|
||||
{
|
||||
@@ -275,7 +276,7 @@ partial class Dump
|
||||
if(_aborted)
|
||||
{
|
||||
currentTry.Extents = ExtentsConverter.ToMetadata(extents);
|
||||
_dumpLog.WriteLine("Aborted!");
|
||||
_dumpLog.WriteLine(Localization.Core.Aborted);
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -290,7 +291,8 @@ partial class Dump
|
||||
currentSpeed > 0)
|
||||
minSpeed = currentSpeed;
|
||||
|
||||
PulseProgress?.Invoke($"Reading sector {i} at lead-out ({currentSpeed:F3} MiB/sec.)");
|
||||
PulseProgress?.Invoke(string.Format(Localization.Core.Reading_sector_0_at_lead_out_1_MiB_sec, i,
|
||||
currentSpeed));
|
||||
|
||||
if(readcd)
|
||||
{
|
||||
|
||||
@@ -69,8 +69,8 @@ partial class Dump
|
||||
int firstTrackPregapSectorsGood = 0;
|
||||
var firstTrackPregapMs = new MemoryStream();
|
||||
|
||||
_dumpLog.WriteLine("Reading first track pregap");
|
||||
UpdateStatus?.Invoke("Reading first track pregap");
|
||||
_dumpLog.WriteLine(Localization.Core.Reading_first_track_pregap);
|
||||
UpdateStatus?.Invoke(Localization.Core.Reading_first_track_pregap);
|
||||
InitProgress?.Invoke();
|
||||
timeSpeedStart = DateTime.UtcNow;
|
||||
|
||||
@@ -79,14 +79,14 @@ partial class Dump
|
||||
{
|
||||
if(_aborted)
|
||||
{
|
||||
_dumpLog.WriteLine("Aborted!");
|
||||
UpdateStatus?.Invoke("Aborted!");
|
||||
_dumpLog.WriteLine(Localization.Core.Aborted);
|
||||
UpdateStatus?.Invoke(Localization.Core.Aborted);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
PulseProgress?.Invoke($"Trying to read first track pregap sector {firstTrackPregapBlock} ({currentSpeed
|
||||
:F3} MiB/sec.)");
|
||||
PulseProgress?.Invoke(string.Format(Localization.Core.Trying_to_read_first_track_pregap_sector_0_1_MiB_sec,
|
||||
firstTrackPregapBlock, currentSpeed));
|
||||
|
||||
// ReSharper disable IntVariableOverflowInUncheckedContext
|
||||
sense = _dev.ReadCd(out cmdBuf, out _, (uint)firstTrackPregapBlock, blockSize, 1, MmcSectorTypes.AllTypes,
|
||||
@@ -126,8 +126,11 @@ partial class Dump
|
||||
mediaTags.Add(MediaTagType.CD_FirstTrackPregap, firstTrackPregapMs.ToArray());
|
||||
|
||||
EndProgress?.Invoke();
|
||||
UpdateStatus?.Invoke($"Got {firstTrackPregapSectorsGood} first track pregap sectors.");
|
||||
_dumpLog.WriteLine("Got {0} first track pregap sectors.", firstTrackPregapSectorsGood);
|
||||
|
||||
UpdateStatus?.Invoke(string.Format(Localization.Core.Got_0_first_track_pregap_sectors,
|
||||
firstTrackPregapSectorsGood));
|
||||
|
||||
_dumpLog.WriteLine(Localization.Core.Got_0_first_track_pregap_sectors, firstTrackPregapSectorsGood);
|
||||
|
||||
firstTrackPregapMs.Close();
|
||||
}
|
||||
@@ -175,17 +178,18 @@ partial class Dump
|
||||
|
||||
AaruConsole.DebugWriteLine("Pregap calculator", bcd switch
|
||||
{
|
||||
true => "Subchannel is BCD",
|
||||
false => "Subchannel is not BCD",
|
||||
_ => "Could not detect drive subchannel BCD"
|
||||
true => Localization.Core.Subchannel_is_BCD,
|
||||
false => Localization.Core.Subchannel_is_not_BCD,
|
||||
_ => Localization.Core.Could_not_detect_drive_subchannel_BCD
|
||||
});
|
||||
|
||||
if(bcd is null)
|
||||
{
|
||||
dumpLog?.WriteLine("Could not detect if drive subchannel is BCD or not, pregaps could not be calculated, dump may be incorrect...");
|
||||
dumpLog?.WriteLine(Localization.Core.
|
||||
Could_not_detect_if_drive_subchannel_is_BCD_or_not_pregaps_could_not_be_calculated_dump_may_be_incorrect);
|
||||
|
||||
updateStatus?.
|
||||
Invoke("Could not detect if drive subchannel is BCD or not, pregaps could not be calculated, dump may be incorrect...");
|
||||
updateStatus?.Invoke(Localization.Core.
|
||||
Could_not_detect_if_drive_subchannel_is_BCD_or_not_pregaps_could_not_be_calculated_dump_may_be_incorrect);
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -202,7 +206,7 @@ partial class Dump
|
||||
// First track of each session has at least 150 sectors of pregap and is not always readable
|
||||
if(tracks.Where(trk => trk.Session == track.Session).MinBy(trk => trk.Sequence).Sequence == track.Sequence)
|
||||
{
|
||||
AaruConsole.DebugWriteLine("Pregap calculator", "Skipping track {0}", track.Sequence);
|
||||
AaruConsole.DebugWriteLine("Pregap calculator", Localization.Core.Skipping_track_0, track.Sequence);
|
||||
|
||||
if(track.Sequence > 1)
|
||||
pregaps[track.Sequence] = 150;
|
||||
@@ -214,20 +218,21 @@ partial class Dump
|
||||
tracks[t - 1].Type == tracks[t].Type &&
|
||||
dumping)
|
||||
{
|
||||
AaruConsole.DebugWriteLine("Pregap calculator", "Skipping track {0}", track.Sequence);
|
||||
AaruConsole.DebugWriteLine("Pregap calculator", Localization.Core.Skipping_track_0, track.Sequence);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
if(dumping && dev.Manufacturer.ToLowerInvariant().StartsWith("plextor", StringComparison.Ordinal))
|
||||
{
|
||||
AaruConsole.DebugWriteLine("Pregap calculator", "Skipping track {0} due to Plextor firmware bug",
|
||||
AaruConsole.DebugWriteLine("Pregap calculator",
|
||||
Localization.Core.Skipping_track_0_due_to_Plextor_firmware_bug,
|
||||
track.Sequence);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
AaruConsole.DebugWriteLine("Pregap calculator", "Track {0}", track.Sequence);
|
||||
AaruConsole.DebugWriteLine("Pregap calculator", Localization.Core.Track_0, track.Sequence);
|
||||
|
||||
int lba = (int)track.StartSector - 1;
|
||||
bool pregapFound = false;
|
||||
@@ -248,8 +253,8 @@ partial class Dump
|
||||
|
||||
if(sense)
|
||||
{
|
||||
AaruConsole.DebugWriteLine("Pregap calculator", "LBA: {0}, Try {1}, Sense {2}", lba, retries + 1,
|
||||
sense);
|
||||
AaruConsole.DebugWriteLine("Pregap calculator", Localization.Core.LBA_0_Try_1_Sense_2, lba,
|
||||
retries + 1, sense);
|
||||
|
||||
continue;
|
||||
}
|
||||
@@ -260,7 +265,8 @@ partial class Dump
|
||||
CRC16CCITTContext.Data(subBuf, 10, out crc);
|
||||
|
||||
AaruConsole.DebugWriteLine("Pregap calculator",
|
||||
"LBA: {0}, Try {1}, Sense {2}, Q: {3:X2} {4:X2} {5:X2} {6:X2} {7:X2} {8:X2} {9:X2} {10:X2} {11:X2} {12:X2} CRC 0x{13:X2}{14:X2}, Calculated CRC: 0x{15:X2}{16:X2}",
|
||||
Localization.Core.
|
||||
LBA_0_Try_1_Sense_2_Q_3_4_5_6_7_8_9_10_11_12_CRC_13_14_Calculated_CRC_15_16,
|
||||
lba, retries + 1, sense, subBuf[0], subBuf[1], subBuf[2], subBuf[3],
|
||||
subBuf[4], subBuf[5], subBuf[6], subBuf[7], subBuf[8], subBuf[9], subBuf[10],
|
||||
subBuf[11], crc[0], crc[1]);
|
||||
@@ -300,7 +306,8 @@ partial class Dump
|
||||
|
||||
if(crcOk)
|
||||
AaruConsole.DebugWriteLine("Pregap calculator",
|
||||
"LBA: {0}, Try {1}, Sense {2}, Q (FIXED): {3:X2} {4:X2} {5:X2} {6:X2} {7:X2} {8:X2} {9:X2} {10:X2} {11:X2} {12:X2} CRC 0x{13:X2}{14:X2}, Calculated CRC: 0x{15:X2}{16:X2}",
|
||||
Localization.Core.
|
||||
LBA_0_Try_1_Sense_2_Q_FIXED_3_4_5_6_7_8_9_10_11_12_CRC_13_14_Calculated_CRC_15_16,
|
||||
lba, retries + 1, sense, subBuf[0], subBuf[1], subBuf[2], subBuf[3],
|
||||
subBuf[4], subBuf[5], subBuf[6], subBuf[7], subBuf[8], subBuf[9],
|
||||
subBuf[10], subBuf[11], crc[0], crc[1]);
|
||||
@@ -358,7 +365,8 @@ partial class Dump
|
||||
CRC16CCITTContext.Data(subBuf, 10, out crc);
|
||||
|
||||
AaruConsole.DebugWriteLine("Pregap calculator",
|
||||
"LBA: {0}, Try {1}, Sense {2}, Q: {3:X2} {4:X2} {5:X2} {6:X2} {7:X2} {8:X2} {9:X2} {10:X2} {11:X2} {12:X2} CRC 0x{13:X2}{14:X2}, Calculated CRC: 0x{15:X2}{16:X2}",
|
||||
Localization.Core.
|
||||
LBA_0_Try_1_Sense_2_Q_3_4_5_6_7_8_9_10_11_12_CRC_13_14_Calculated_CRC_15_16,
|
||||
lba, retries + 1, sense, subBuf[0], subBuf[1], subBuf[2], subBuf[3],
|
||||
subBuf[4], subBuf[5], subBuf[6], subBuf[7], subBuf[8], subBuf[9],
|
||||
subBuf[10], subBuf[11], crc[0], crc[1]);
|
||||
@@ -399,7 +407,8 @@ partial class Dump
|
||||
if(crcOk)
|
||||
{
|
||||
AaruConsole.DebugWriteLine("Pregap calculator",
|
||||
"LBA: {0}, Try {1}, Sense {2}, Q (FIXED): {3:X2} {4:X2} {5:X2} {6:X2} {7:X2} {8:X2} {9:X2} {10:X2} {11:X2} {12:X2} CRC 0x{13:X2}{14:X2}, Calculated CRC: 0x{15:X2}{16:X2}",
|
||||
Localization.Core.
|
||||
LBA_0_Try_1_Sense_2_Q_FIXED_3_4_5_6_7_8_9_10_11_12_CRC_13_14_Calculated_CRC_15_16,
|
||||
lba, retries + 1, sense, subBuf[0], subBuf[1], subBuf[2],
|
||||
subBuf[3], subBuf[4], subBuf[5], subBuf[6], subBuf[7], subBuf[8],
|
||||
subBuf[9], subBuf[10], subBuf[11], crc[0], crc[1]);
|
||||
@@ -425,35 +434,42 @@ partial class Dump
|
||||
if((previousTrack.Type == TrackType.Audio && track.Type != TrackType.Audio) ||
|
||||
(previousTrack.Type != TrackType.Audio && track.Type == TrackType.Audio))
|
||||
{
|
||||
dumpLog?.
|
||||
WriteLine("Could not read subchannel for this track, supposing 150 sectors.");
|
||||
dumpLog?.WriteLine(Localization.Core.
|
||||
Could_not_read_subchannel_for_this_track_supposing_hundred_fifty_sectors);
|
||||
|
||||
updateStatus?.
|
||||
Invoke("Could not read subchannel for this track, supposing 150 sectors.");
|
||||
updateStatus?.Invoke(Localization.Core.
|
||||
Could_not_read_subchannel_for_this_track_supposing_hundred_fifty_sectors);
|
||||
}
|
||||
else
|
||||
{
|
||||
dumpLog?.
|
||||
WriteLine("Could not read subchannel for this track, supposing 0 sectors.");
|
||||
dumpLog?.WriteLine(Localization.Core.
|
||||
Could_not_read_subchannel_for_this_track_supposing_zero_sectors);
|
||||
|
||||
updateStatus?.
|
||||
Invoke("Could not read subchannel for this track, supposing 0 sectors.");
|
||||
updateStatus?.Invoke(Localization.Core.
|
||||
Could_not_read_subchannel_for_this_track_supposing_zero_sectors);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dumpLog?.WriteLine($"Could not read subchannel for this track, supposing {
|
||||
pregaps[track.Sequence]} sectors.");
|
||||
dumpLog?.
|
||||
WriteLine(string.
|
||||
Format(Localization.Core.Could_not_read_subchannel_for_this_track_supposing_0_sectors,
|
||||
pregaps[track.Sequence]));
|
||||
|
||||
updateStatus?.Invoke($"Could not read subchannel for this track, supposing {
|
||||
pregaps[track.Sequence]} sectors.");
|
||||
updateStatus?.
|
||||
Invoke(string.
|
||||
Format(Localization.Core.Could_not_read_subchannel_for_this_track_supposing_0_sectors,
|
||||
pregaps[track.Sequence]));
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
dumpLog?.WriteLine($"Could not read subchannel for sector {lba}");
|
||||
updateStatus?.Invoke($"Could not read subchannel for sector {lba}");
|
||||
dumpLog?.WriteLine(string.Format(Localization.Core.Could_not_read_subchannel_for_sector_0,
|
||||
lba));
|
||||
|
||||
updateStatus?.Invoke(string.Format(Localization.Core.Could_not_read_subchannel_for_sector_0,
|
||||
lba));
|
||||
|
||||
lba++;
|
||||
forward = true;
|
||||
@@ -461,15 +477,18 @@ partial class Dump
|
||||
continue;
|
||||
}
|
||||
|
||||
dumpLog?.WriteLine($"Could not get correct subchannel for sector {lba}");
|
||||
updateStatus?.Invoke($"Could not get correct subchannel for sector {lba}");
|
||||
dumpLog?.WriteLine(string.Format(Localization.Core.Could_not_get_correct_subchannel_for_sector_0,
|
||||
lba));
|
||||
|
||||
updateStatus?.Invoke(string.Format(Localization.Core.Could_not_get_correct_subchannel_for_sector_0,
|
||||
lba));
|
||||
}
|
||||
|
||||
if(subBuf.All(b => b == 0))
|
||||
{
|
||||
inexactPositioning = true;
|
||||
|
||||
AaruConsole.DebugWriteLine("Pregap calculator", "All Q empty for LBA {0}", lba);
|
||||
AaruConsole.DebugWriteLine("Pregap calculator", Localization.Core.All_Q_empty_for_LBA_0, lba);
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -535,8 +554,8 @@ partial class Dump
|
||||
|
||||
if(diff != 0)
|
||||
{
|
||||
AaruConsole.DebugWriteLine("Pregap calculator", "Invalid Q position for LBA {0}, got {1}", lba,
|
||||
posQ);
|
||||
AaruConsole.DebugWriteLine("Pregap calculator",
|
||||
Localization.Core.Invalid_Q_position_for_LBA_0_got_1, lba, posQ);
|
||||
|
||||
inexactPositioning = true;
|
||||
}
|
||||
@@ -558,8 +577,8 @@ partial class Dump
|
||||
// If CRC is not OK, only accept pregaps less than 10 sectors longer than previously now
|
||||
if(crcOk || pregapQ - pregaps[track.Sequence] < 10)
|
||||
{
|
||||
AaruConsole.DebugWriteLine("Pregap calculator", "Pregap for track {0}: {1}", track.Sequence,
|
||||
pregapQ);
|
||||
AaruConsole.DebugWriteLine("Pregap calculator", Localization.Core.Pregap_for_track_0_1,
|
||||
track.Sequence, pregapQ);
|
||||
|
||||
pregaps[track.Sequence] = pregapQ;
|
||||
}
|
||||
@@ -604,8 +623,10 @@ partial class Dump
|
||||
trk.StartSector -= trk.Pregap;
|
||||
|
||||
#if DEBUG
|
||||
dumpLog?.WriteLine($"Track {trk.Sequence} pregap is {trk.Pregap} sectors");
|
||||
updateStatus?.Invoke($"Track {trk.Sequence} pregap is {trk.Pregap} sectors");
|
||||
dumpLog?.WriteLine(string.Format(Localization.Core.Track_0_pregap_is_1_sectors, trk.Sequence, trk.Pregap));
|
||||
|
||||
updateStatus?.Invoke(string.Format(Localization.Core.Track_0_pregap_is_1_sectors, trk.Sequence,
|
||||
trk.Pregap));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,11 +63,11 @@ partial class Dump
|
||||
if(runOutSectors.Count == 0)
|
||||
return;
|
||||
|
||||
_dumpLog.WriteLine($"{runOutSectors.Count
|
||||
} sectors at the end of the disc are unreadable. This is normal in CD-R(W) discs as these sectors are created by burning software as part of the recording process. Empty ones will be generated and stored in the image.");
|
||||
_dumpLog.WriteLine(string.Format(Localization.Core._0_sectors_at_the_end_of_the_disc_are_unreadable,
|
||||
runOutSectors.Count));
|
||||
|
||||
UpdateStatus?.Invoke($"{runOutSectors.Count
|
||||
} sectors at the end of the disc are unreadable. This is normal in CD-R(W) discs as these sectors are created by burning software as part of the recording process. Empty ones will be generated and stored in the image.");
|
||||
UpdateStatus?.Invoke(string.Format(Localization.Core._0_sectors_at_the_end_of_the_disc_are_unreadable,
|
||||
runOutSectors.Count));
|
||||
|
||||
foreach(ulong s in runOutSectors)
|
||||
{
|
||||
|
||||
@@ -50,8 +50,8 @@ partial class Dump
|
||||
/// <returns><c>true</c> if read correctly, <c>false</c> otherwise</returns>
|
||||
public static bool SupportsRwSubchannel(Device dev, DumpLog dumpLog, UpdateStatusHandler updateStatus, uint lba)
|
||||
{
|
||||
dumpLog?.WriteLine("Checking if drive supports full raw subchannel reading...");
|
||||
updateStatus?.Invoke("Checking if drive supports full raw subchannel reading...");
|
||||
dumpLog?.WriteLine(Localization.Core.Checking_if_drive_supports_full_raw_subchannel_reading);
|
||||
updateStatus?.Invoke(Localization.Core.Checking_if_drive_supports_full_raw_subchannel_reading);
|
||||
|
||||
return !dev.ReadCd(out _, out _, lba, 2352 + 96, 1, MmcSectorTypes.AllTypes, false, false, true,
|
||||
MmcHeaderCodes.AllHeaders, true, true, MmcErrorField.None, MmcSubchannel.Raw, dev.Timeout,
|
||||
@@ -66,8 +66,8 @@ partial class Dump
|
||||
/// <returns><c>true</c> if read correctly, <c>false</c> otherwise</returns>
|
||||
public static bool SupportsPqSubchannel(Device dev, DumpLog dumpLog, UpdateStatusHandler updateStatus, uint lba)
|
||||
{
|
||||
dumpLog?.WriteLine("Checking if drive supports PQ subchannel reading...");
|
||||
updateStatus?.Invoke("Checking if drive supports PQ subchannel reading...");
|
||||
dumpLog?.WriteLine(Localization.Core.Checking_if_drive_supports_PQ_subchannel_reading);
|
||||
updateStatus?.Invoke(Localization.Core.Checking_if_drive_supports_PQ_subchannel_reading);
|
||||
|
||||
return !dev.ReadCd(out _, out _, lba, 2352 + 16, 1, MmcSectorTypes.AllTypes, false, false, true,
|
||||
MmcHeaderCodes.AllHeaders, true, true, MmcErrorField.None, MmcSubchannel.Q16, dev.Timeout,
|
||||
|
||||
@@ -61,8 +61,8 @@ partial class Dump
|
||||
firstTrackLastSession = 1;
|
||||
|
||||
// ATIP exists on blank CDs
|
||||
_dumpLog.WriteLine("Reading ATIP");
|
||||
UpdateStatus?.Invoke("Reading ATIP");
|
||||
_dumpLog.WriteLine(Localization.Core.Reading_ATIP);
|
||||
UpdateStatus?.Invoke(Localization.Core.Reading_ATIP);
|
||||
sense = _dev.ReadAtip(out cmdBuf, out _, _dev.Timeout, out _);
|
||||
|
||||
if(!sense)
|
||||
@@ -80,8 +80,8 @@ partial class Dump
|
||||
}
|
||||
}
|
||||
|
||||
_dumpLog.WriteLine("Reading Disc Information");
|
||||
UpdateStatus?.Invoke("Reading Disc Information");
|
||||
_dumpLog.WriteLine(Localization.Core.Reading_Disc_Information);
|
||||
UpdateStatus?.Invoke(Localization.Core.Reading_Disc_Information);
|
||||
|
||||
sense = _dev.ReadDiscInformation(out cmdBuf, out _, MmcDiscInformationDataTypes.DiscInformation, _dev.Timeout,
|
||||
out _);
|
||||
@@ -100,8 +100,8 @@ partial class Dump
|
||||
};
|
||||
}
|
||||
|
||||
_dumpLog.WriteLine("Reading PMA");
|
||||
UpdateStatus?.Invoke("Reading PMA");
|
||||
_dumpLog.WriteLine(Localization.Core.Reading_PMA);
|
||||
UpdateStatus?.Invoke(Localization.Core.Reading_PMA);
|
||||
sense = _dev.ReadPma(out cmdBuf, out _, _dev.Timeout, out _);
|
||||
|
||||
if(!sense &&
|
||||
@@ -112,8 +112,8 @@ partial class Dump
|
||||
mediaTags.Add(MediaTagType.CD_PMA, tmpBuf);
|
||||
}
|
||||
|
||||
_dumpLog.WriteLine("Reading Session Information");
|
||||
UpdateStatus?.Invoke("Reading Session Information");
|
||||
_dumpLog.WriteLine(Localization.Core.Reading_Session_Information);
|
||||
UpdateStatus?.Invoke(Localization.Core.Reading_Session_Information);
|
||||
sense = _dev.ReadSessionInfo(out cmdBuf, out _, _dev.Timeout, out _);
|
||||
|
||||
if(!sense)
|
||||
@@ -127,8 +127,8 @@ partial class Dump
|
||||
}
|
||||
}
|
||||
|
||||
_dumpLog.WriteLine("Reading CD-Text from Lead-In");
|
||||
UpdateStatus?.Invoke("Reading CD-Text from Lead-In");
|
||||
_dumpLog.WriteLine(Localization.Core.Reading_CD_Text_from_Lead_In);
|
||||
UpdateStatus?.Invoke(Localization.Core.Reading_CD_Text_from_Lead_In);
|
||||
sense = _dev.ReadCdText(out cmdBuf, out _, _dev.Timeout, out _);
|
||||
|
||||
if(sense || !CDTextOnLeadIn.Decode(cmdBuf).HasValue)
|
||||
|
||||
@@ -76,8 +76,8 @@ partial class Dump
|
||||
|
||||
// We discarded all discs that falsify a TOC before requesting a real TOC
|
||||
// No TOC, no CD (or an empty one)
|
||||
dumpLog?.WriteLine("Reading full TOC");
|
||||
updateStatus?.Invoke("Reading full TOC");
|
||||
dumpLog?.WriteLine(Localization.Core.Reading_full_TOC);
|
||||
updateStatus?.Invoke(Localization.Core.Reading_full_TOC);
|
||||
sense = dev.ReadRawToc(out cmdBuf, out _, 0, dev.Timeout, out _);
|
||||
|
||||
if(!sense)
|
||||
@@ -92,8 +92,8 @@ partial class Dump
|
||||
}
|
||||
}
|
||||
|
||||
updateStatus?.Invoke("Building track map...");
|
||||
dumpLog?.WriteLine("Building track map...");
|
||||
updateStatus?.Invoke(Localization.Core.Building_track_map);
|
||||
dumpLog?.WriteLine(Localization.Core.Building_track_map);
|
||||
|
||||
if(toc.HasValue)
|
||||
{
|
||||
@@ -175,8 +175,8 @@ partial class Dump
|
||||
}
|
||||
else
|
||||
{
|
||||
updateStatus?.Invoke("Cannot read RAW TOC, requesting processed one...");
|
||||
dumpLog?.WriteLine("Cannot read RAW TOC, requesting processed one...");
|
||||
updateStatus?.Invoke(Localization.Core.Cannot_read_RAW_TOC_requesting_processed_one);
|
||||
dumpLog?.WriteLine(Localization.Core.Cannot_read_RAW_TOC_requesting_processed_one);
|
||||
sense = dev.ReadToc(out cmdBuf, out _, false, 0, dev.Timeout, out _);
|
||||
|
||||
TOC.CDTOC? oldToc = TOC.Decode(cmdBuf);
|
||||
@@ -184,10 +184,11 @@ partial class Dump
|
||||
if((sense || !oldToc.HasValue) &&
|
||||
!force)
|
||||
{
|
||||
dumpLog?.WriteLine("Could not read TOC, if you want to continue, use force, and will try from LBA 0 to 360000...");
|
||||
dumpLog?.WriteLine(Localization.Core.
|
||||
Could_not_read_TOC_if_you_want_to_continue_use_force_and_will_try_from_LBA_0_to_360000);
|
||||
|
||||
stoppingErrorMessage?.
|
||||
Invoke("Could not read TOC, if you want to continue, use force, and will try from LBA 0 to 360000...");
|
||||
stoppingErrorMessage?.Invoke(Localization.Core.
|
||||
Could_not_read_TOC_if_you_want_to_continue_use_force_and_will_try_from_LBA_0_to_360000);
|
||||
|
||||
return null;
|
||||
}
|
||||
@@ -227,8 +228,8 @@ partial class Dump
|
||||
|
||||
if(trackList.Count == 0)
|
||||
{
|
||||
updateStatus?.Invoke("No tracks found, adding a single track from 0 to Lead-Out");
|
||||
dumpLog?.WriteLine("No tracks found, adding a single track from 0 to Lead-Out");
|
||||
updateStatus?.Invoke(Localization.Core.No_tracks_found_adding_a_single_track_from_zero_to_Lead_Out);
|
||||
dumpLog?.WriteLine(Localization.Core.No_tracks_found_adding_a_single_track_from_zero_to_Lead_Out);
|
||||
|
||||
trackList.Add(new Track
|
||||
{
|
||||
@@ -269,18 +270,17 @@ partial class Dump
|
||||
|
||||
if(!force)
|
||||
{
|
||||
stoppingErrorMessage?.
|
||||
Invoke("Could not find Lead-Out, if you want to continue use force option and will continue until 360000 sectors...");
|
||||
stoppingErrorMessage?.Invoke(Localization.Core.
|
||||
Could_not_find_Lead_Out_if_you_want_to_continue_use_force_option);
|
||||
|
||||
dumpLog?.WriteLine("Could not find Lead-Out, if you want to continue use force option and will continue until 360000 sectors...");
|
||||
dumpLog?.WriteLine(Localization.Core.Could_not_find_Lead_Out_if_you_want_to_continue_use_force_option);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
updateStatus?.
|
||||
Invoke("WARNING: Could not find Lead-Out start, will try to read up to 360000 sectors, probably will fail before...");
|
||||
updateStatus?.Invoke(Localization.Core.WARNING_Could_not_find_Lead_Out_start_will_try_to_read_up_to);
|
||||
|
||||
dumpLog?.WriteLine("WARNING: Could not find Lead-Out start, will try to read up to 360000 sectors, probably will fail before...");
|
||||
dumpLog?.WriteLine(Localization.Core.WARNING_Could_not_find_Lead_Out_start_will_try_to_read_up_to);
|
||||
lastSector = 360000;
|
||||
|
||||
return trackList.ToArray();
|
||||
|
||||
@@ -106,8 +106,8 @@ partial class Dump
|
||||
return;
|
||||
|
||||
start = DateTime.UtcNow;
|
||||
UpdateStatus?.Invoke("Trimming skipped sectors");
|
||||
_dumpLog.WriteLine("Trimming skipped sectors");
|
||||
UpdateStatus?.Invoke(Localization.Core.Trimming_skipped_sectors);
|
||||
_dumpLog.WriteLine(Localization.Core.Trimming_skipped_sectors);
|
||||
InitProgress?.Invoke();
|
||||
|
||||
trimStart:
|
||||
@@ -120,13 +120,13 @@ partial class Dump
|
||||
if(_aborted)
|
||||
{
|
||||
currentTry.Extents = ExtentsConverter.ToMetadata(extents);
|
||||
UpdateStatus?.Invoke("Aborted!");
|
||||
_dumpLog.WriteLine("Aborted!");
|
||||
UpdateStatus?.Invoke(Localization.Core.Aborted);
|
||||
_dumpLog.WriteLine(Localization.Core.Aborted);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
PulseProgress?.Invoke($"Trimming sector {badSector}");
|
||||
PulseProgress?.Invoke(string.Format(Localization.Core.Trimming_sector_0, badSector));
|
||||
|
||||
Track track = tracks.OrderBy(t => t.StartSector).LastOrDefault(t => badSector >= t.StartSector);
|
||||
|
||||
@@ -286,7 +286,10 @@ partial class Dump
|
||||
|
||||
EndProgress?.Invoke();
|
||||
end = DateTime.UtcNow;
|
||||
UpdateStatus?.Invoke($"Trimming finished in {(end - start).TotalSeconds} seconds.");
|
||||
_dumpLog.WriteLine("Trimming finished in {0} seconds.", (end - start).TotalSeconds);
|
||||
|
||||
UpdateStatus?.Invoke(string.Format(Localization.Core.Trimming_finished_in_0_seconds,
|
||||
(end - start).TotalSeconds));
|
||||
|
||||
_dumpLog.WriteLine(Localization.Core.Trimming_finished_in_0_seconds, (end - start).TotalSeconds);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user