summaryrefslogtreecommitdiffstats
path: root/module/network/Request.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-10-05 20:07:44 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-10-05 20:07:44 +0200
commitfaf6fbc956f8c23871c0bcb91a84986ffd689201 (patch)
tree19afd74d1ba7438816c02689ae3b093c57eea2cc /module/network/Request.py
parentclosed #116 (diff)
downloadpyload-faf6fbc956f8c23871c0bcb91a84986ffd689201.tar.xz
changed dl function for test purpose
Diffstat (limited to 'module/network/Request.py')
-rwxr-xr-xmodule/network/Request.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/module/network/Request.py b/module/network/Request.py
index f5c856f6f..21159dde1 100755
--- a/module/network/Request.py
+++ b/module/network/Request.py
@@ -287,8 +287,9 @@ class Request:
self.chunkRead += chunkSize
self.dl_arrived += chunkSize
- self.pycurl.setopt(pycurl.WRITEFUNCTION, writefunc)
-
+ #self.pycurl.setopt(pycurl.WRITEFUNCTION, writefunc)
+ self.pycurl.setopt(pycurl.WRITEDATA, self.fp)
+
try:
self.pycurl.perform()
except Exception, e:
@@ -344,7 +345,8 @@ class Request:
def get_speed(self):
try:
- return self.dl_speed
+ #return self.dl_speed
+ return (self.dl_arrived / (time.time()- self.dl_time)) / 1024
except:
return 0