mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-03 06:58:42 +00:00
Properly calculate ETA in common.estimate_eta().
This commit is contained in:
parent
92acd7907e
commit
7a37c58dde
1 changed files with 2 additions and 1 deletions
|
@ -47,7 +47,8 @@ PLUGIN_DIR = os.path.join(INSTALL_PREFIX, 'share', 'deluge', 'plugins')
|
||||||
|
|
||||||
def estimate_eta(state):
|
def estimate_eta(state):
|
||||||
try:
|
try:
|
||||||
return ftime(get_eta(state["total_size"], state["total_done"], state["download_rate"]))
|
return ftime(get_eta(state["total_wanted"], state["total_done"],
|
||||||
|
state["download_rate"]))
|
||||||
except ZeroDivisionError:
|
except ZeroDivisionError:
|
||||||
return _("Infinity")
|
return _("Infinity")
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue