diff options
author | Walter Purcaro <vuolter@gmail.com> | 2015-01-10 15:56:14 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2015-01-10 15:56:14 +0100 |
commit | 9414b30e931b5659786035972690d14788b49826 (patch) | |
tree | db87c570505616fdb88c60c10dd51aebf7ab7b37 /module/plugins | |
parent | [RehostTo] Fix https://github.com/pyload/pyload/issues/1009 (diff) | |
download | pyload-9414b30e931b5659786035972690d14788b49826.tar.xz |
[MultiHoster] Fix filename recognition
Diffstat (limited to 'module/plugins')
-rw-r--r-- | module/plugins/internal/MultiHoster.py | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/module/plugins/internal/MultiHoster.py b/module/plugins/internal/MultiHoster.py index b6eaf34aa..5011b88a3 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.30" + __version__ = "0.31" __pattern__ = r'^unmatchable$' @@ -52,28 +52,23 @@ class MultiHoster(SimpleHoster): def process(self, pyfile): self.prepare() - try: - module = self.core.pluginManager.hosterPlugins[self.__name__]['module'] - klass = getattr(module, self.__name__) + self.wait(5) - self.logDebug("File info (BEFORE): %s" % self.info) - self.info.update(klass.getInfo(self.pyfile.url, self.html)) - self.logDebug("File info (AFTER): %s" % self.info) + if self.__pattern__ != r'^unmatchable$' and re.match(self.__pattern__, pyfile.url): + self.checkInfo() - except Exception: + elif not pyfile.name or pyfile.name == pyfile.url: self.checkNameSize() - else: - self.checkNameSize(getinfo=False) - self.checkStatus(getinfo=False) - if self.directDL: self.logDebug("Looking for direct download link...") self.handleDirect(pyfile) if not self.link and not self.lastDownload: self.preload() - self.checkInfo() + + self.checkErrors() + self.checkStatus(getinfo=False) if self.premium and (not self.CHECK_TRAFFIC or self.checkTrafficLeft()): self.logDebug("Handled as premium download") |