diff options
Diffstat (limited to 'module/plugins/internal/MultiHoster.py')
-rw-r--r-- | module/plugins/internal/MultiHoster.py | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/module/plugins/internal/MultiHoster.py b/module/plugins/internal/MultiHoster.py index ba613c997..ad5b6283e 100644 --- a/module/plugins/internal/MultiHoster.py +++ b/module/plugins/internal/MultiHoster.py @@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo, r class MultiHoster(SimpleHoster): __name__ = "MultiHoster" __type__ = "hoster" - __version__ = "0.33" + __version__ = "0.36" __pattern__ = r'^unmatchable$' @@ -27,9 +27,10 @@ class MultiHoster(SimpleHoster): def prepare(self): - self.info = {} - self.link = "" #@TODO: Move to hoster class in 0.4.10 - self.directDL = False #@TODO: Move to hoster class in 0.4.10 + self.info = {} + self.html = "" + self.link = "" #@TODO: Move to hoster class in 0.4.10 + self.directDL = False #@TODO: Move to hoster class in 0.4.10 if self.LOGIN_ACCOUNT and not self.account: self.fail(_("Required account not found")) @@ -40,7 +41,7 @@ class MultiHoster(SimpleHoster): set_cookies(self.req.cj, self.COOKIES) if self.DIRECT_LINK is None: - self.directDL = self.__pattern__ != r'^unmatchable$' + self.directDL = self.__pattern__ != r'^unmatchable$' and re.match(self.__pattern__, self.pyfile.url) else: self.directDL = self.DIRECT_LINK @@ -51,10 +52,8 @@ class MultiHoster(SimpleHoster): def process(self, pyfile): self.prepare() - if self.__pattern__ != r'^unmatchable$' and re.match(self.__pattern__, pyfile.url): - self.checkInfo() - if self.directDL: + self.checkInfo() self.logDebug("Looking for direct download link...") self.handleDirect(pyfile) @@ -72,17 +71,10 @@ class MultiHoster(SimpleHoster): self.logDebug("Handled as free download") self.handleFree(pyfile) - self.downloadLink(self.link) + self.downloadLink(self.link, True) self.checkFile() - #@TODO: Remove in 0.4.10 - def downloadLink(self, link): - if link and isinstance(link, basestring): - self.correctCaptcha() - self.download(link, disposition=True) - - def handlePremium(self, pyfile): return self.handleFree(pyfile) |