diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-04-13 09:22:01 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-04-13 09:22:01 +0200 |
commit | 2432ade6c9bd7284a5bf0d760796638eef634be9 (patch) | |
tree | 877cfd29c6e5117a974377ead73cbbc150f6544d /pyload/plugin/internal/MultiHook.py | |
parent | Prepare hook plugins to merging from stable (diff) | |
parent | [LolabitsEs] Cleanup (diff) | |
download | pyload-2432ade6c9bd7284a5bf0d760796638eef634be9.tar.xz |
Merge branch 'stable' into 0.4.10
Conflicts:
module/plugins/hooks/MultihostersComHook.py
module/plugins/hooks/PutdriveComHook.py
module/plugins/internal/CaptchaService.py
pyload/plugin/account/OboomCom.py
pyload/plugin/account/SmoozedCom.py
pyload/plugin/addon/AntiVirus.py
pyload/plugin/addon/ExternalScripts.py
pyload/plugin/addon/ExtractArchive.py
pyload/plugin/addon/RestartSlow.py
pyload/plugin/crypter/CrockoCom.py
pyload/plugin/crypter/DepositfilesCom.py
pyload/plugin/crypter/FshareVn.py
pyload/plugin/crypter/LinkdecrypterCom.py
pyload/plugin/crypter/MegaRapidCz.py
pyload/plugin/crypter/PastebinCom.py
pyload/plugin/hoster/CatShareNet.py
pyload/plugin/hoster/EdiskCz.py
pyload/plugin/hoster/ExtabitCom.py
pyload/plugin/hoster/GigapetaCom.py
pyload/plugin/hoster/GooIm.py
pyload/plugin/hoster/IfolderRu.py
pyload/plugin/hoster/LuckyShareNet.py
pyload/plugin/hoster/MegasharesCom.py
pyload/plugin/hoster/MovReelCom.py
pyload/plugin/hoster/NarodRu.py
pyload/plugin/hoster/NowDownloadSx.py
pyload/plugin/hoster/NowVideoSx.py
pyload/plugin/hoster/QuickshareCz.py
pyload/plugin/hoster/RemixshareCom.py
pyload/plugin/hoster/RgHostNet.py
pyload/plugin/hoster/SendspaceCom.py
pyload/plugin/hoster/UlozTo.py
pyload/plugin/hoster/UnibytesCom.py
pyload/plugin/hoster/UploadingCom.py
pyload/plugin/hoster/WrzucTo.py
pyload/plugin/internal/MultiHook.py
pyload/plugin/internal/SimpleHoster.py
Diffstat (limited to 'pyload/plugin/internal/MultiHook.py')
-rw-r--r-- | pyload/plugin/internal/MultiHook.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/pyload/plugin/internal/MultiHook.py b/pyload/plugin/internal/MultiHook.py index e15d5afda..4ca158c24 100644 --- a/pyload/plugin/internal/MultiHook.py +++ b/pyload/plugin/internal/MultiHook.py @@ -2,6 +2,7 @@ import re import time +import traceback from pyload.plugin.Hook import Hook from pyload.utils import decode, remove_chars @@ -10,7 +11,7 @@ from pyload.utils import decode, remove_chars class MultiHook(Hook): __name__ = "MultiHook" __type__ = "hook" - __version__ = "0.40" + __version__ = "0.44" __config__ = [("pluginmode" , "all;listed;unlisted", "Use for plugins" , "all"), ("pluginlist" , "str" , "Plugin list (comma separated)", "" ), @@ -64,20 +65,19 @@ class MultiHook(Hook): self.pluginname = None self.plugintype = None - self._initPlugin() + self.initPlugin() - def _initPlugin(self): - plugin = self.core.pluginManager.findPlugin("hoster", self.__class__.__name__) + def initPlugin(self): + self.pluginname = self.__class__.__name__.rsplit("Hook", 1)[0] + plugin, self.plugintype = self.core.pluginManager.findPlugin(self.pluginname) - if not plugin: + if plugin: + self.pluginmodule = self.core.pluginManager.loadModule(self.plugintype, self.pluginname) + self.pluginclass = getattr(self.pluginmodule, self.pluginname) + else: self.logWarning("Hook plugin will be deactivated due missing plugin reference") self.setConfig('activated', False) - else: - self.pluginname = self.__class__.__name__ - self.plugintype = "hoster" - self.pluginmodule = self.core.pluginManager.loadModule("hoster", self.__class__.__name__) - self.pluginclass = getattr(self.pluginmodule, self.__class__.__name__) def loadAccount(self): |