From c66a630a502a5e118d8773b32820aca861ce32cd Mon Sep 17 00:00:00 2001 From: mkaay Date: Wed, 22 Dec 2010 23:44:33 +0100 Subject: new download backend integrated so far, downloading works, but still big todo list --- module/PyFile.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'module/PyFile.py') 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 -- cgit v1.2.3