summaryrefslogtreecommitdiffstats
path: root/module/PyFile.py
diff options
context:
space:
mode:
authorGravatar mkaay <mkaay@mkaay.de> 2010-12-22 23:44:33 +0100
committerGravatar mkaay <mkaay@mkaay.de> 2010-12-22 23:44:33 +0100
commitc66a630a502a5e118d8773b32820aca861ce32cd (patch)
treefa7b4c5d0f107fb2448a3f399041927182e098a5 /module/PyFile.py
parentfinal cookie fix :D (diff)
downloadpyload-c66a630a502a5e118d8773b32820aca861ce32cd.tar.xz
new download backend integrated so far, downloading works, but still big todo list
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