From 3d1042e27e91c9ec6d0d5c787a50c45b1c1944bb Mon Sep 17 00:00:00 2001 From: derrod Date: Sat, 5 Mar 2022 14:10:18 +0100 Subject: [PATCH] [cli] Ensure delta is >= 1 before verification speed calculation Fixes #412 --- legendary/cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legendary/cli.py b/legendary/cli.py index 11d13b4..9180e89 100644 --- a/legendary/cli.py +++ b/legendary/cli.py @@ -1176,7 +1176,7 @@ class LegendaryCLI: percentage = (processed / total_size) * 100.0 num += 1 - if (delta := ((current_time := time.time()) - last_update)) > 1 or not last_processed: + if (delta := ((current_time := time.time()) - last_update)) > 1 or (not last_processed and delta > 1): last_update = current_time speed = (processed - last_processed) / 1024 / 1024 / delta last_processed = processed