mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Fix file extraction progress bars not displaying properly (and going away)
This commit is contained in:
parent
cc329bd04c
commit
431b00fa50
@ -8,6 +8,7 @@
|
|||||||
* Massively improve patch load times
|
* Massively improve patch load times
|
||||||
* Massively improve patch build times
|
* Massively improve patch build times
|
||||||
* Reduce situations where the UI appears to be hung due the above two issues
|
* Reduce situations where the UI appears to be hung due the above two issues
|
||||||
|
* Fix file extraction progress bars not displaying properly (and going away)
|
||||||
|
|
||||||
|
|
||||||
#### Version - 3.0.1.4 - 9/21/2022
|
#### Version - 3.0.1.4 - 9/21/2022
|
||||||
|
@ -473,13 +473,18 @@ public abstract class ACompiler
|
|||||||
|
|
||||||
NextStep("Compiling", "Generating Patches", toBuild.Length);
|
NextStep("Compiling", "Generating Patches", toBuild.Length);
|
||||||
|
|
||||||
var allFiles = toBuild.SelectMany(f => new[]
|
var allFiles = toBuild.SelectMany(f =>
|
||||||
{
|
{
|
||||||
_vfs.Index.FileForArchiveHashPath(f.ArchiveHashPath),
|
UpdateProgress(1);
|
||||||
FindDestFile(f.To)
|
return new[]
|
||||||
|
{
|
||||||
|
_vfs.Index.FileForArchiveHashPath(f.ArchiveHashPath),
|
||||||
|
FindDestFile(f.To)
|
||||||
|
};
|
||||||
})
|
})
|
||||||
.DistinctBy(f => f.Hash)
|
.DistinctBy(f => f.Hash)
|
||||||
.ToHashSet();
|
.ToHashSet();
|
||||||
|
|
||||||
_logger.LogInformation("Extracting {Count} ({Size}) files for building patches", allFiles.Count,
|
_logger.LogInformation("Extracting {Count} ({Size}) files for building patches", allFiles.Count,
|
||||||
allFiles.Sum(f => f.Size).ToFileSizeString());
|
allFiles.Sum(f => f.Size).ToFileSizeString());
|
||||||
|
|
||||||
|
@ -13,7 +13,6 @@ using OMODFramework;
|
|||||||
using Wabbajack.Common;
|
using Wabbajack.Common;
|
||||||
using Wabbajack.Common.FileSignatures;
|
using Wabbajack.Common.FileSignatures;
|
||||||
using Wabbajack.Compression.BSA;
|
using Wabbajack.Compression.BSA;
|
||||||
using Wabbajack.Compression.BSA.FO4Archive;
|
|
||||||
using Wabbajack.DTOs.Streams;
|
using Wabbajack.DTOs.Streams;
|
||||||
using Wabbajack.FileExtractor.ExtractedFiles;
|
using Wabbajack.FileExtractor.ExtractedFiles;
|
||||||
using Wabbajack.IO.Async;
|
using Wabbajack.IO.Async;
|
||||||
@ -343,8 +342,8 @@ public class FileExtractor
|
|||||||
|
|
||||||
if (!int.TryParse(line[..3], out var percentInt)) return;
|
if (!int.TryParse(line[..3], out var percentInt)) return;
|
||||||
|
|
||||||
var oldPosition = lastPercent == 0 ? 0 : totalSize / lastPercent;
|
var oldPosition = lastPercent == 0 ? 0 : totalSize / 100 * lastPercent;
|
||||||
var newPosition = percentInt == 0 ? 0 : totalSize / percentInt;
|
var newPosition = percentInt == 0 ? 0 : totalSize / 100 * percentInt;
|
||||||
var throughput = newPosition - oldPosition;
|
var throughput = newPosition - oldPosition;
|
||||||
job.ReportNoWait((int) throughput);
|
job.ReportNoWait((int) throughput);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user