From f53d57b902b71708f05a3125872ec5d34ebe65b9 Mon Sep 17 00:00:00 2001 From: Armin Date: Thu, 9 Apr 2015 20:11:11 +0200 Subject: fix: OboomCom and SmoozedCom with beaker >= v1.7.x fix: run plugins this fix makes the plugin attribute "__name" obsolet --- pyload/plugin/internal/MultiHook.py | 8 ++++---- pyload/plugin/internal/MultiHoster.py | 4 ++-- pyload/plugin/internal/SimpleHoster.py | 2 +- pyload/plugin/internal/XFSCrypter.py | 2 +- pyload/plugin/internal/XFSHoster.py | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) (limited to 'pyload/plugin/internal') diff --git a/pyload/plugin/internal/MultiHook.py b/pyload/plugin/internal/MultiHook.py index 5e828cd5e..c5fb21db5 100644 --- a/pyload/plugin/internal/MultiHook.py +++ b/pyload/plugin/internal/MultiHook.py @@ -68,16 +68,16 @@ class MultiHook(Hook): def _initPlugin(self): - plugin, type = self.core.pluginManager.findPlugin(self.__name) + plugin, type = self.core.pluginManager.findPlugin(self.__class__.__name__) if not plugin: self.logWarning("Hook plugin will be deactivated due missing plugin reference") self.setConfig('activated', False) else: - self.pluginname = self.__name + self.pluginname = self.__class__.__name__ self.plugintype = type - self.pluginmodule = self.core.pluginManager.loadModule(type, self.__name) - self.pluginclass = getattr(self.pluginmodule, self.__name) + self.pluginmodule = self.core.pluginManager.loadModule(type, self.__class__.__name__) + self.pluginclass = getattr(self.pluginmodule, self.__class__.__name__) def loadAccount(self): diff --git a/pyload/plugin/internal/MultiHoster.py b/pyload/plugin/internal/MultiHoster.py index a38da9bdb..a7e74b2ff 100644 --- a/pyload/plugin/internal/MultiHoster.py +++ b/pyload/plugin/internal/MultiHoster.py @@ -86,8 +86,8 @@ class MultiHoster(SimpleHoster): self.retryFree() elif self.getConfig('revertfailed', True) \ - and "new_module" in self.core.pluginManager.hosterPlugins[self.__name]: - hdict = self.core.pluginManager.hosterPlugins[self.__name] + and "new_module" in self.core.pluginManager.hosterPlugins[self.__class__.__name__]: + hdict = self.core.pluginManager.hosterPlugins[self.__class__.__name__] tmp_module = hdict['new_module'] tmp_name = hdict['new_name'] diff --git a/pyload/plugin/internal/SimpleHoster.py b/pyload/plugin/internal/SimpleHoster.py index d07eca2a1..60f13324f 100644 --- a/pyload/plugin/internal/SimpleHoster.py +++ b/pyload/plugin/internal/SimpleHoster.py @@ -437,7 +437,7 @@ class SimpleHoster(Hoster): set_cookies(self.req.cj, self.COOKIES) if (self.MULTI_HOSTER - and (self.__pattern != self.core.pluginManager.hosterPlugins[self.__name]['pattern'] + and (self.__pattern != self.core.pluginManager.hosterPlugins[self.__class__.__name__]['pattern'] or re.match(self.__pattern, self.pyfile.url) is None)): self.multihost = True return diff --git a/pyload/plugin/internal/XFSCrypter.py b/pyload/plugin/internal/XFSCrypter.py index 44b4ed724..6a3f09e55 100644 --- a/pyload/plugin/internal/XFSCrypter.py +++ b/pyload/plugin/internal/XFSCrypter.py @@ -31,7 +31,7 @@ class XFSCrypter(SimpleCrypter): if self.account: account = self.account else: - account_name = (self.__name + ".py").replace("Folder.py", "").replace(".py", "") + account_name = (self.__class__.__name__ + ".py").replace("Folder.py", "").replace(".py", "") account = self.pyfile.m.core.accountManager.getAccountPlugin(account_name) if account and hasattr(account, "HOSTER_DOMAIN") and account.HOSTER_DOMAIN: diff --git a/pyload/plugin/internal/XFSHoster.py b/pyload/plugin/internal/XFSHoster.py index 05b26bebe..e87b6b0ee 100644 --- a/pyload/plugin/internal/XFSHoster.py +++ b/pyload/plugin/internal/XFSHoster.py @@ -64,7 +64,7 @@ class XFSHoster(SimpleHoster): if self.account: account = self.account else: - account = self.pyfile.m.core.accountManager.getAccountPlugin(self.__name) + account = self.pyfile.m.core.accountManager.getAccountPlugin(self.__class__.__name__) if account and hasattr(account, "HOSTER_DOMAIN") and account.HOSTER_DOMAIN: self.HOSTER_DOMAIN = account.HOSTER_DOMAIN -- cgit v1.2.3