diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-01-09 18:00:33 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-01-09 18:00:33 +0100 |
commit | 4ab9088e21ecfdd1194d6c60a9857962a82d2895 (patch) | |
tree | 6ccf0c4491260f29d0ab1c3b345ecebbcd886494 | |
parent | fixed chunk range (diff) | |
download | pyload-4ab9088e21ecfdd1194d6c60a9857962a82d2895.tar.xz |
disabled chunk download for files.mail.ru
-rw-r--r-- | module/network/HTTPChunk.py | 6 | ||||
-rw-r--r-- | module/plugins/hoster/FilesMailRu.py | 2 |
2 files changed, 3 insertions, 5 deletions
diff --git a/module/network/HTTPChunk.py b/module/network/HTTPChunk.py index 72c6427e8..573ed1766 100644 --- a/module/network/HTTPChunk.py +++ b/module/network/HTTPChunk.py @@ -142,8 +142,6 @@ class HTTPChunk(HTTPRequest): self.c.setopt(pycurl.WRITEFUNCTION, self.writeBody) self.c.setopt(pycurl.HEADERFUNCTION, self.writeHeader) - # request one byte more, since some servers in russia seems to have a defect arihmetic unit - if self.resume: self.fp = open(self.p.info.getChunkName(self.id), "ab") self.arrived = self.fp.tell() @@ -152,7 +150,7 @@ class HTTPChunk(HTTPRequest): #do nothing if chunk already finished if not self.arrived + self.range[0] - self.range[1]: return None - range = "%i-%i" % (self.arrived + self.range[0], min(self.range[1] + 1, self.p.size-1)) + range = "%i-%i" % (self.arrived + self.range[0], self.range[1]) print "Chunked resume with range %s" % range self.c.setopt(pycurl.RANGE, range) else: @@ -161,7 +159,7 @@ class HTTPChunk(HTTPRequest): else: if self.range: - range = "%i-%i" % (self.range[0], min(self.range[1] + 1, self.p.size-1)) + range = "%i-%i" % self.range print "Chunked with range %s" % range self.c.setopt(pycurl.RANGE, range) diff --git a/module/plugins/hoster/FilesMailRu.py b/module/plugins/hoster/FilesMailRu.py index 3fa40cbd0..ff6cb76a9 100644 --- a/module/plugins/hoster/FilesMailRu.py +++ b/module/plugins/hoster/FilesMailRu.py @@ -41,7 +41,7 @@ class FilesMailRu(Hoster): def setup(self): self.multiDL = True self.resumeDownload = True - self.chunkLimit = -1 + self.chunkLimit = 1 def process(self, pyfile): self.html = self.load(pyfile.url) |