Don't trust 100% to count jobs finished.

This commit is contained in:
Jim Miller 2021-02-09 17:54:35 -06:00
parent 53fe026cfe
commit b60c83bfd5

View file

@ -98,7 +98,7 @@ def do_download_worker(book_list,
(percent,msg) = job.notifications.get_nowait()
logger.debug("%s<-%s"%(percent,msg))
totals[msg] = percent/len(totals)
if percent == 1.0:
if job.is_finished:
count += 1
notification(max(0.01,sum(totals.values())), _('%(count)d of %(total)d stories finished downloading')%{'count':count,'total':len(totals)})
except Empty: