diff options
author | Walter Purcaro <vuolter@gmail.com> | 2015-01-03 02:11:08 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2015-01-03 02:11:08 +0100 |
commit | cbfd244f6240a6e29420d10a2aef8fa107cf8d7c (patch) | |
tree | e257ffc2b5bd5c7e96f27c5693ff7b585e7ce778 | |
parent | [MegaCoNz] Fix https://github.com/pyload/pyload/issues/367 (diff) | |
download | pyload-cbfd244f6240a6e29420d10a2aef8fa107cf8d7c.tar.xz |
[MultiHoster] Improve info grabbing
-rw-r--r-- | module/plugins/internal/MultiHoster.py | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/module/plugins/internal/MultiHoster.py b/module/plugins/internal/MultiHoster.py index 16c32b3ef..60320399a 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.28" + __version__ = "0.29" __pattern__ = r'^unmatchable$' @@ -50,15 +50,26 @@ class MultiHoster(SimpleHoster): def process(self, pyfile): self.prepare() + try: + module = self.core.pluginManager.hosterPlugins[self.__name__]['module'] + klass = getattr(module, self.__name__) + + 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) + + except Exception: + 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 self.link: - self.pyfile.url = self.link - self.checkNameSize() - - elif not self.lastDownload: + if not self.link and not self.lastDownload: self.preload() self.checkInfo() |