diff options
Diffstat (limited to 'module/network')
| -rw-r--r-- | module/network/Browser.py | 4 | ||||
| -rw-r--r-- | module/network/HTTPDownload.py | 9 | 
2 files changed, 3 insertions, 10 deletions
| diff --git a/module/network/Browser.py b/module/network/Browser.py index 9cf6c2f30..25cbf669b 100644 --- a/module/network/Browser.py +++ b/module/network/Browser.py @@ -87,11 +87,11 @@ class Browser(object):              self.dl.abort = True      def httpDownload(self, url, filename, get={}, post={}, ref=True, cookies=True, chunks=1, resume=False, -                     progressNotify=None, disposition=False): +                    disposition=False):          """ this can also download ftp """          self._size = 0          self.dl = HTTPDownload(url, filename, get, post, self.lastEffectiveURL if ref else None, -            self.cj if cookies else None, self.bucket, self.options, progressNotify, disposition) +            self.cj if cookies else None, self.bucket, self.options, disposition)          name = self.dl.download(chunks, resume)          self._size = self.dl.size 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: | 
