diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-12-27 21:18:29 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-12-27 21:18:29 +0100 |
commit | 9509a6444bbb538e136ed899d94aab32be629383 (patch) | |
tree | ac8532b20912a3e5be6ff73443520a7f31f5806a /module/PyFile.py | |
parent | encoding fix (diff) | |
download | pyload-9509a6444bbb538e136ed899d94aab32be629383.tar.xz |
new curl download backend - support for chunked dl, resume
Diffstat (limited to 'module/PyFile.py')
-rw-r--r-- | module/PyFile.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/module/PyFile.py b/module/PyFile.py index c198ce459..648b7e838 100644 --- a/module/PyFile.py +++ b/module/PyFile.py @@ -70,7 +70,7 @@ class PyFile(): # database information ends here self.plugin = None - self.download = None + #self.download = None self.waitUntil = 0 # time() + time to wait @@ -212,7 +212,7 @@ class PyFile(): def getSpeed(self): """ calculates speed """ try: - return self.download.speed + return self.plugin.req.speed except: return 0 @@ -226,21 +226,23 @@ class PyFile(): def getBytesLeft(self): """ gets bytes left """ try: - return self.download.size - self.download.arrived + return self.plugin.req.size - self.plugin.req.arrived except: return 0 def getPercent(self): """ get % of download """ - return self.progress.getPercent() + try: + return self.plugin.req.percent + except: + return 0 def getSize(self): """ get size of download """ if self.size: return self.size else: try: - if not self.download.size: return 0 - return self.download.size + return self.plugin.req.size except: return 0 |