diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2009-05-26 15:36:51 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2009-05-26 15:36:51 +0200 |
commit | d02541c948a71533469663b3400bc4a3179548c2 (patch) | |
tree | 021232e6a2e0f05b99b21041e66ae1ccdc651ea5 /module/network | |
parent | better youtube video id parsing, nicer testoutput (diff) | |
download | pyload-d02541c948a71533469663b3400bc4a3179548c2.tar.xz |
introduced logger
Diffstat (limited to 'module/network')
-rwxr-xr-x | module/network/Request.py | 3 |
1 files changed, 2 insertions, 1 deletions
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" |