From 45e34ccb518bb93da9b66e3eb94bca29e4239040 Mon Sep 17 00:00:00 2001 From: Mircea Roata Date: Fri, 29 Dec 2023 20:41:12 +0200 Subject: [PATCH] Fix completed extraction counter missing most mods --- backend/bindings/ficsitcli/process.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/backend/bindings/ficsitcli/process.go b/backend/bindings/ficsitcli/process.go index a310806c..fad7c8ab 100644 --- a/backend/bindings/ficsitcli/process.go +++ b/backend/bindings/ficsitcli/process.go @@ -96,7 +96,15 @@ func (f *FicsitCLI) validateInstall(installation *InstallationInfo, progressItem go func() { for update := range installChannel { + if update.Type == cli.InstallUpdateTypeOverall { + // Although this wouldn't cause any issues in the progress generation above, we can ignore this update. + continue + } modProgresses.Compute(update.Item.Mod, func(oldValue modProgress, loaded bool) (modProgress, bool) { + if oldValue.complete { + // Sometimes extract updates are received after the mod is marked as complete. + return oldValue, false + } oldValue.complete = update.Type == cli.InstallUpdateTypeModComplete oldValue.downloading = update.Type == cli.InstallUpdateTypeModDownload