diff options
Diffstat (limited to 'module/network/Request.py')
-rwxr-xr-x | module/network/Request.py | 8 |
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 |