diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2012-09-24 15:41:13 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2012-09-24 15:41:13 +0200 |
commit | fb145cf68c0178b9551eaae3213ec01be112bf76 (patch) | |
tree | 61d8dd381a831da4c34359b5e471e11d687f4746 /module/network/HTTPDownload.py | |
parent | added some animations, code for show/hiding items (diff) | |
download | pyload-fb145cf68c0178b9551eaae3213ec01be112bf76.tar.xz |
fixed some things, so downloads works again
Diffstat (limited to 'module/network/HTTPDownload.py')
-rw-r--r-- | module/network/HTTPDownload.py | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/module/network/HTTPDownload.py b/module/network/HTTPDownload.py index c6d2e1547..5a4436529 100644 --- a/module/network/HTTPDownload.py +++ b/module/network/HTTPDownload.py @@ -37,7 +37,7 @@ class HTTPDownload(): """ loads an url, http + ftp supported """ def __init__(self, url, filename, get={}, post={}, referer=None, cj=None, bucket=None, - options={}, progressNotify=None, disposition=False): + options={}, disposition=False): self.url = url self.filename = filename #complete file destination, not only name self.get = get @@ -73,8 +73,6 @@ class HTTPDownload(): self.speeds = [] self.lastSpeeds = [0, 0] - self.progressNotify = progressNotify - @property def speed(self): last = [sum(x) for x in self.lastSpeeds if x] @@ -286,7 +284,6 @@ class HTTPDownload(): self.speeds = [float(a) / (t - lastTimeCheck) for a in diff] self.lastArrived = [c.arrived for c in self.chunks] lastTimeCheck = t - self.updateProgress() if self.abort: raise Abort() @@ -299,10 +296,6 @@ class HTTPDownload(): self._copyChunks() - def updateProgress(self): - if self.progressNotify: - self.progressNotify(self.percent) - def findChunk(self, handle): """ linear search to find a chunk (should be ok since chunk size is usually low) """ for chunk in self.chunks: |