summaryrefslogtreecommitdiffstats
path: root/module/PyFile.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/PyFile.py')
-rw-r--r--module/PyFile.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/module/PyFile.py b/module/PyFile.py
index 62588e116..1723808c7 100644
--- a/module/PyFile.py
+++ b/module/PyFile.py
@@ -161,11 +161,13 @@ class PyFile():
"""abort pyfile if possible"""
while self.id in self.m.core.threadManager.processingIds():
self.abort = True
- if self.plugin and self.plugin.req: self.plugin.req.abort = True
+ if self.plugin and self.plugin.req:
+ self.plugin.req.abortDownloads()
sleep(0.1)
self.abort = False
- if hasattr(self, "plugin") and self.plugin and self.plugin.req: self.plugin.req.abort = False
+ if hasattr(self, "plugin") and self.plugin and self.plugin.req:
+ self.plugin.req.abortDownloads()
self.release()
def finishIfDone(self):
@@ -205,7 +207,7 @@ class PyFile():
def getSpeed(self):
""" calculates speed """
try:
- return self.plugin.req.get_speed()
+ return self.plugin.req.speed/1024 #kb/s
except:
return 0