summaryrefslogtreecommitdiffstats
path: root/module/network
diff options
context:
space:
mode:
Diffstat (limited to 'module/network')
-rwxr-xr-xmodule/network/Request.py3
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"