mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Use a block map in media scan in the GUI.
This commit is contained in:
@@ -147,6 +147,7 @@ namespace DiscImageChef.Core.Devices.Scanning
|
||||
|
||||
UpdateStatus?.Invoke($"Reading {blocksToRead} sectors at a time.");
|
||||
|
||||
InitBlockMap?.Invoke(results.Blocks, blockSize, blocksToRead);
|
||||
MhddLog mhddLog = new MhddLog(mhddLogPath, dev, results.Blocks, blockSize, blocksToRead);
|
||||
IbgLog ibgLog = new IbgLog(ibgLogPath, SD_PROFILE);
|
||||
|
||||
@@ -180,13 +181,13 @@ namespace DiscImageChef.Core.Devices.Scanning
|
||||
else if(duration >= 3) results.B += blocksToRead;
|
||||
else results.A += blocksToRead;
|
||||
|
||||
ScanTime?.Invoke(duration, blocksToRead);
|
||||
ScanTime?.Invoke(i, duration);
|
||||
mhddLog.Write(i, duration);
|
||||
ibgLog.Write(i, currentSpeed * 1024);
|
||||
}
|
||||
else
|
||||
{
|
||||
ScanUnreadable?.Invoke(blocksToRead);
|
||||
ScanUnreadable?.Invoke(i);
|
||||
results.Errored += blocksToRead;
|
||||
for(ulong b = i; b < i + blocksToRead; b++) results.UnreadableSectors.Add(b);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user