From 7a37c58ddec738a1e87f30f69f3074c8e26e0345 Mon Sep 17 00:00:00 2001 From: Alex Dedul Date: Sat, 21 Jul 2007 18:53:31 +0000 Subject: [PATCH] Properly calculate ETA in common.estimate_eta(). --- src/common.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common.py b/src/common.py index 3c6183f24..3d99fac1c 100644 --- a/src/common.py +++ b/src/common.py @@ -47,7 +47,8 @@ PLUGIN_DIR = os.path.join(INSTALL_PREFIX, 'share', 'deluge', 'plugins') def estimate_eta(state): 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: return _("Infinity")