From d02541c948a71533469663b3400bc4a3179548c2 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Tue, 26 May 2009 15:36:51 +0200 Subject: introduced logger --- module/network/Request.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'module/network/Request.py') diff --git a/module/network/Request.py b/module/network/Request.py index 1c0317cc7..510f6d069 100755 --- a/module/network/Request.py +++ b/module/network/Request.py @@ -27,6 +27,7 @@ class Request: def __init__(self): self.dl_time = 0 + self.dl_finished = 0 self.dl_size = 0 self.dl_arrived = 0 self.dl = False @@ -114,7 +115,7 @@ class Request: def get_ETA(self): try: - return (self.dl_size - self.dl_arrived) / (self.dl_arrived / (time.time() - self.dl_time)) + return (self.dl_size - self.dl_arrived) / (self.dl_arrived / (time.time() - self.dl_time if self.dl else self.dl_finished)) except: return "No Download" -- cgit v1.2.3