diff options
author | Walter Purcaro <vuolter@gmail.com> | 2015-02-09 17:42:31 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2015-02-09 17:42:31 +0100 |
commit | 6616c00ba1c40f5d56959bd0e4725f26250e1292 (patch) | |
tree | 17ca0a420cf6c104c9a78a0d31d7a81fc7270f5c /module/plugins/internal | |
parent | [CaptchaService] Cleanup (diff) | |
download | pyload-6616c00ba1c40f5d56959bd0e4725f26250e1292.tar.xz |
Spare code cosmetics
Diffstat (limited to 'module/plugins/internal')
-rw-r--r-- | module/plugins/internal/SimpleHoster.py | 9 | ||||
-rw-r--r-- | module/plugins/internal/XFSHoster.py | 4 |
2 files changed, 7 insertions, 6 deletions
diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py index ca8fce05f..e820ab141 100644 --- a/module/plugins/internal/SimpleHoster.py +++ b/module/plugins/internal/SimpleHoster.py @@ -246,7 +246,7 @@ def secondsToMidnight(gmt=0): class SimpleHoster(Hoster): __name__ = "SimpleHoster" __type__ = "hoster" - __version__ = "1.14" + __version__ = "1.15" __pattern__ = r'^unmatchable$' @@ -309,6 +309,7 @@ class SimpleHoster(Hoster): DIRECT_LINK = None #: Set to True to looking for direct link (as defined in handleDirect method), set to None to do it if self.account is True else False MULTI_HOSTER = False #: Set to True to leech other hoster link (as defined in handleMulti method) LOGIN_ACCOUNT = False #: Set to True to require account login + DISPOSITION = True #: Work-around to `filename*=UTF-8` bug; remove in 0.4.10 directLink = fileUrl #@TODO: Remove in 0.4.10 @@ -482,11 +483,11 @@ class SimpleHoster(Hoster): self.logDebug("Handled as free download") self.handleFree(pyfile) - self.downloadLink(self.link) + self.downloadLink(self.link, self.DISPOSITION) #: Remove `DISPOSITION` in 0.4.10 self.checkFile() - def downloadLink(self, link, disposition=False): #@TODO: Set `disposition=True` in 0.4.10 + def downloadLink(self, link, disposition=True): if link and isinstance(link, basestring): self.correctCaptcha() @@ -598,7 +599,7 @@ class SimpleHoster(Hoster): pass self.logDebug("File name: %s" % self.pyfile.name, - "File size: %s" % self.pyfile.size if self.pyfile.size > 0 else "Unknown") + "File size: %s" % (self.pyfile.size if self.pyfile.size > 0 else "Unknown")) def checkInfo(self): diff --git a/module/plugins/internal/XFSHoster.py b/module/plugins/internal/XFSHoster.py index 624534dbd..624db87b7 100644 --- a/module/plugins/internal/XFSHoster.py +++ b/module/plugins/internal/XFSHoster.py @@ -16,7 +16,7 @@ from module.utils import html_unescape class XFSHoster(SimpleHoster): __name__ = "XFSHoster" __type__ = "hoster" - __version__ = "0.41" + __version__ = "0.42" __pattern__ = r'^unmatchable$' @@ -89,7 +89,7 @@ class XFSHoster(SimpleHoster): self.directDL = self.premium - def downloadLink(self, link, disposition=False): #@TODO: Set `disposition=True` in 0.4.10 + def downloadLink(self, link, disposition=True): if link and isinstance(link, basestring): self.correctCaptcha() |