mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix incorrect counting on initial done event for time estimation
This commit is contained in:
parent
f77b3e778a
commit
874507efec
@ -35,7 +35,7 @@ class IndexingProgress:
|
||||
changed = (left, total) != (self.left, self.total)
|
||||
if changed:
|
||||
done_num = self.left - left
|
||||
if done_num:
|
||||
if done_num > 0 and self.left > -1: # initial event will have self.left == -1
|
||||
self.done_events.append((done_num, time.monotonic()))
|
||||
if len(self.done_events) > 50:
|
||||
self.done_events.popleft()
|
||||
|
Loading…
x
Reference in New Issue
Block a user