summaryrefslogtreecommitdiffstats
path: root/module/network/FTPBase.py
diff options
context:
space:
mode:
authorGravatar mkaay <mkaay@mkaay.de> 2010-12-23 11:28:03 +0100
committerGravatar mkaay <mkaay@mkaay.de> 2010-12-23 11:28:03 +0100
commita4ba4ba12aff34c967f958576db40806656c3de8 (patch)
tree57a26d6559279fa4ed9c28fadfa31f4d36a7eceb /module/network/FTPBase.py
parentnew download backend integrated so far, downloading works, but still big todo... (diff)
downloadpyload-a4ba4ba12aff34c967f958576db40806656c3de8.tar.xz
fixed eta and progress, ready for first test
Diffstat (limited to 'module/network/FTPBase.py')
-rw-r--r--module/network/FTPBase.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/module/network/FTPBase.py b/module/network/FTPBase.py
index 036da383a..ce4627d0c 100644
--- a/module/network/FTPBase.py
+++ b/module/network/FTPBase.py
@@ -128,6 +128,10 @@ class FTPDownload():
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.speedCalcLen += size
self.arrived += size