diff options
author | estaban <babedoudi@yahoo.fr> | 2014-08-30 19:10:35 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-10-20 13:04:50 +0200 |
commit | 946264a976217b49fcd1b095e2de9b652161be39 (patch) | |
tree | ccf6b44e9c8a3613ea76c36a420acf1eb1e1737b | |
parent | [MegasharesCom] Fix PASSPORT_RENEW_PATTERN (diff) | |
download | pyload-946264a976217b49fcd1b095e2de9b652161be39.tar.xz |
Fix resume and progress column for some FTP files
-rw-r--r-- | module/PyFile.py | 2 | ||||
-rw-r--r-- | module/network/HTTPChunk.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/module/PyFile.py b/module/PyFile.py index 3dede9360..9e20ceab4 100644 --- a/module/PyFile.py +++ b/module/PyFile.py @@ -251,7 +251,7 @@ class PyFile(object): def getBytesLeft(self): """ gets bytes left """ try: - return self.plugin.req.size - self.plugin.req.arrived + return self.getSize() - self.plugin.req.arrived except: return 0 diff --git a/module/network/HTTPChunk.py b/module/network/HTTPChunk.py index b637aef32..d42744cf4 100644 --- a/module/network/HTTPChunk.py +++ b/module/network/HTTPChunk.py @@ -208,7 +208,7 @@ class HTTPChunk(HTTPRequest): # as first chunk, we will parse the headers if not self.range and self.header.endswith("\r\n\r\n"): self.parseHeader() - elif not self.range and buf.startswith("150") and "data connection" in buf: #ftp file size parsing + elif not self.range and buf.startswith("150") and "data connection" in buf.lower(): #: ftp file size parsing size = search(r"(\d+) bytes", buf) if size: self.p.size = int(size.group(1)) @@ -290,4 +290,4 @@ class HTTPChunk(HTTPRequest): """ closes everything, unusable after this """ if self.fp: self.fp.close() self.c.close() - if hasattr(self, "p"): del self.p
\ No newline at end of file + if hasattr(self, "p"): del self.p |