diff options
author | mkaay <mkaay@mkaay.de> | 2010-12-23 11:28:03 +0100 |
---|---|---|
committer | mkaay <mkaay@mkaay.de> | 2010-12-23 11:28:03 +0100 |
commit | a4ba4ba12aff34c967f958576db40806656c3de8 (patch) | |
tree | 57a26d6559279fa4ed9c28fadfa31f4d36a7eceb /module/network/HTTPChunk.py | |
parent | new download backend integrated so far, downloading works, but still big todo... (diff) | |
download | pyload-a4ba4ba12aff34c967f958576db40806656c3de8.tar.xz |
fixed eta and progress, ready for first test
Diffstat (limited to 'module/network/HTTPChunk.py')
-rw-r--r-- | module/network/HTTPChunk.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/module/network/HTTPChunk.py b/module/network/HTTPChunk.py index f26e681b6..48ebc13f3 100644 --- a/module/network/HTTPChunk.py +++ b/module/network/HTTPChunk.py @@ -92,6 +92,10 @@ class HTTPChunk(HTTPBase): self.speed = self.speedCalcLen self.speedCalcTime = inttime() self.speedCalcLen = 0 + try: + self.deferred.progress("percent", 100-int((self.size - self.arrived)/float(self.size)*100)) + except: + pass size = len(data) self.arrived += size |