diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-03-26 18:29:00 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-03-26 18:29:00 +0100 |
commit | c3b406a00aba3fa549676a8181a5eb2a99d77c87 (patch) | |
tree | dc9c76f31e4c0baec0a53b6e2bd03182de08f518 /pyload/plugin/internal | |
parent | Cleanup (diff) | |
download | pyload-c3b406a00aba3fa549676a8181a5eb2a99d77c87.tar.xz |
Diffstat (limited to 'pyload/plugin/internal')
-rw-r--r-- | pyload/plugin/internal/BasePlugin.py | 14 | ||||
-rw-r--r-- | pyload/plugin/internal/DeadCrypter.py | 14 | ||||
-rw-r--r-- | pyload/plugin/internal/DeadHoster.py | 14 | ||||
-rw-r--r-- | pyload/plugin/internal/MultiHook.py | 28 | ||||
-rw-r--r-- | pyload/plugin/internal/MultiHoster.py | 22 | ||||
-rw-r--r-- | pyload/plugin/internal/SimpleCrypter.py | 16 | ||||
-rw-r--r-- | pyload/plugin/internal/SimpleDereferer.py | 18 | ||||
-rw-r--r-- | pyload/plugin/internal/SimpleHoster.py | 24 | ||||
-rw-r--r-- | pyload/plugin/internal/XFSAccount.py | 12 | ||||
-rw-r--r-- | pyload/plugin/internal/XFSCrypter.py | 16 | ||||
-rw-r--r-- | pyload/plugin/internal/XFSHoster.py | 16 |
11 files changed, 97 insertions, 97 deletions
diff --git a/pyload/plugin/internal/BasePlugin.py b/pyload/plugin/internal/BasePlugin.py index 0b6e8f102..947c0fb3b 100644 --- a/pyload/plugin/internal/BasePlugin.py +++ b/pyload/plugin/internal/BasePlugin.py @@ -11,15 +11,15 @@ from pyload.plugin.Hoster import Hoster class BasePlugin(Hoster): - __name__ = "BasePlugin" - __type__ = "hoster" - __version__ = "0.38" + __name = "BasePlugin" + __type = "hoster" + __version = "0.38" - __pattern__ = r'^unmatchable$' + __pattern = r'^unmatchable$' - __description__ = """Base plugin when any other didnt fit""" - __license__ = "GPLv3" - __authors__ = [("RaNaN", "RaNaN@pyload.org"), + __description = """Base plugin when any other didnt fit""" + __license = "GPLv3" + __authors = [("RaNaN", "RaNaN@pyload.org"), ("Walter Purcaro", "vuolter@gmail.com")] diff --git a/pyload/plugin/internal/DeadCrypter.py b/pyload/plugin/internal/DeadCrypter.py index ddeb0431d..daa7e1a0d 100644 --- a/pyload/plugin/internal/DeadCrypter.py +++ b/pyload/plugin/internal/DeadCrypter.py @@ -4,15 +4,15 @@ from pyload.plugin.Crypter import Crypter as _Crypter class DeadCrypter(_Crypter): - __name__ = "DeadCrypter" - __type__ = "crypter" - __version__ = "0.04" + __name = "DeadCrypter" + __type = "crypter" + __version = "0.04" - __pattern__ = r'^unmatchable$' + __pattern = r'^unmatchable$' - __description__ = """Crypter is no longer available""" - __license__ = "GPLv3" - __authors__ = [("stickell", "l.stickell@yahoo.it")] + __description = """Crypter is no longer available""" + __license = "GPLv3" + __authors = [("stickell", "l.stickell@yahoo.it")] @classmethod diff --git a/pyload/plugin/internal/DeadHoster.py b/pyload/plugin/internal/DeadHoster.py index 1596943ae..2e57decdb 100644 --- a/pyload/plugin/internal/DeadHoster.py +++ b/pyload/plugin/internal/DeadHoster.py @@ -4,15 +4,15 @@ from pyload.plugin.Hoster import Hoster as _Hoster class DeadHoster(_Hoster): - __name__ = "DeadHoster" - __type__ = "hoster" - __version__ = "0.14" + __name = "DeadHoster" + __type = "hoster" + __version = "0.14" - __pattern__ = r'^unmatchable$' + __pattern = r'^unmatchable$' - __description__ = """Hoster is no longer available""" - __license__ = "GPLv3" - __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] + __description = """Hoster is no longer available""" + __license = "GPLv3" + __authors = [("zoidberg", "zoidberg@mujmail.cz")] @classmethod diff --git a/pyload/plugin/internal/MultiHook.py b/pyload/plugin/internal/MultiHook.py index ab96d30ca..5e828cd5e 100644 --- a/pyload/plugin/internal/MultiHook.py +++ b/pyload/plugin/internal/MultiHook.py @@ -8,18 +8,18 @@ from pyload.utils import decode, remove_chars class MultiHook(Hook): - __name__ = "MultiHook" - __type__ = "hook" - __version__ = "0.40" + __name = "MultiHook" + __type = "hook" + __version = "0.40" - __config__ = [("pluginmode" , "all;listed;unlisted", "Use for plugins" , "all"), + __config = [("pluginmode" , "all;listed;unlisted", "Use for plugins" , "all"), ("pluginlist" , "str" , "Plugin list (comma separated)", "" ), ("reload" , "bool" , "Reload plugin list" , True ), ("reloadinterval", "int" , "Reload interval in hours" , 12 )] - __description__ = """Hook plugin for multi hoster/crypter""" - __license__ = "GPLv3" - __authors__ = [("pyLoad Team" , "admin@pyload.org" ), + __description = """Hook plugin for multi hoster/crypter""" + __license = "GPLv3" + __authors = [("pyLoad Team" , "admin@pyload.org" ), ("Walter Purcaro", "vuolter@gmail.com")] @@ -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.__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.__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.__name) + self.pluginclass = getattr(self.pluginmodule, self.__name) def loadAccount(self): @@ -252,8 +252,8 @@ class MultiHook(Hook): # create new regexp regexp = r'.*(?P<DOMAIN>%s).*' % "|".join(x.replace('.', '\.') for x in plugins) - if hasattr(self.pluginclass, "__pattern__") and isinstance(self.pluginclass.__pattern__, basestring) and '://' in self.pluginclass.__pattern__: - regexp = r'%s|%s' % (self.pluginclass.__pattern__, regexp) + if hasattr(self.pluginclass, "__pattern") and isinstance(self.pluginclass.__pattern, basestring) and '://' in self.pluginclass.__pattern: + regexp = r'%s|%s' % (self.pluginclass.__pattern, regexp) self.logDebug("Regexp: %s" % regexp) @@ -280,5 +280,5 @@ class MultiHook(Hook): # reset pattern hdict = self.core.pluginManager.plugins[self.plugintype][self.pluginname] - hdict['pattern'] = getattr(self.pluginclass, "__pattern__", r'^unmatchable$') + hdict['pattern'] = getattr(self.pluginclass, "__pattern", r'^unmatchable$') hdict['re'] = re.compile(hdict['pattern']) diff --git a/pyload/plugin/internal/MultiHoster.py b/pyload/plugin/internal/MultiHoster.py index e9bb483da..a38da9bdb 100644 --- a/pyload/plugin/internal/MultiHoster.py +++ b/pyload/plugin/internal/MultiHoster.py @@ -7,17 +7,17 @@ from pyload.plugin.internal.SimpleHoster import SimpleHoster, replace_patterns, class MultiHoster(SimpleHoster): - __name__ = "MultiHoster" - __type__ = "hoster" - __version__ = "0.39" + __name = "MultiHoster" + __type = "hoster" + __version = "0.39" - __pattern__ = r'^unmatchable$' - __config__ = [("use_premium" , "bool", "Use premium account if available" , True), + __pattern = r'^unmatchable$' + __config = [("use_premium" , "bool", "Use premium account if available" , True), ("revertfailed", "bool", "Revert to standard download if fails", True)] - __description__ = """Multi hoster plugin""" - __license__ = "GPLv3" - __authors__ = [("Walter Purcaro", "vuolter@gmail.com")] + __description = """Multi hoster plugin""" + __license = "GPLv3" + __authors = [("Walter Purcaro", "vuolter@gmail.com")] LOGIN_ACCOUNT = True @@ -47,7 +47,7 @@ class MultiHoster(SimpleHoster): set_cookies(self.req.cj, self.COOKIES) if self.DIRECT_LINK is None: - self.directDL = self.__pattern__ != r'^unmatchable$' and re.match(self.__pattern__, self.pyfile.url) + self.directDL = self.__pattern != r'^unmatchable$' and re.match(self.__pattern, self.pyfile.url) else: self.directDL = self.DIRECT_LINK @@ -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.__name]: + hdict = self.core.pluginManager.hosterPlugins[self.__name] tmp_module = hdict['new_module'] tmp_name = hdict['new_name'] diff --git a/pyload/plugin/internal/SimpleCrypter.py b/pyload/plugin/internal/SimpleCrypter.py index 472488268..4c19270fd 100644 --- a/pyload/plugin/internal/SimpleCrypter.py +++ b/pyload/plugin/internal/SimpleCrypter.py @@ -10,17 +10,17 @@ from pyload.utils import fixup class SimpleCrypter(Crypter, SimpleHoster): - __name__ = "SimpleCrypter" - __type__ = "crypter" - __version__ = "0.43" + __name = "SimpleCrypter" + __type = "crypter" + __version = "0.43" - __pattern__ = r'^unmatchable$' - __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), #: Overrides core.config['general']['folder_per_package'] + __pattern = r'^unmatchable$' + __config = [("use_subfolder" , "bool", "Save package to subfolder" , True), #: Overrides core.config['general']['folder_per_package'] ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] - __description__ = """Simple decrypter plugin""" - __license__ = "GPLv3" - __authors__ = [("Walter Purcaro", "vuolter@gmail.com" )] + __description = """Simple decrypter plugin""" + __license = "GPLv3" + __authors = [("Walter Purcaro", "vuolter@gmail.com" )] """ diff --git a/pyload/plugin/internal/SimpleDereferer.py b/pyload/plugin/internal/SimpleDereferer.py index e24a7b836..fc50db153 100644 --- a/pyload/plugin/internal/SimpleDereferer.py +++ b/pyload/plugin/internal/SimpleDereferer.py @@ -9,17 +9,17 @@ from pyload.plugin.internal.SimpleHoster import getFileURL, set_cookies class SimpleDereferer(Crypter): - __name__ = "SimpleDereferer" - __type__ = "crypter" - __version__ = "0.08" + __name = "SimpleDereferer" + __type = "crypter" + __version = "0.08" - __pattern__ = r'^unmatchable$' - __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), + __pattern = r'^unmatchable$' + __config = [("use_subfolder" , "bool", "Save package to subfolder" , True), ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] - __description__ = """Simple dereferer plugin""" - __license__ = "GPLv3" - __authors__ = [("Walter Purcaro", "vuolter@gmail.com")] + __description = """Simple dereferer plugin""" + __license = "GPLv3" + __authors = [("Walter Purcaro", "vuolter@gmail.com")] """ @@ -49,7 +49,7 @@ class SimpleDereferer(Crypter): if not link: try: - link = unquote(re.match(self.__pattern__, pyfile.url).group('LINK')) + link = unquote(re.match(self.__pattern, pyfile.url).group('LINK')) except Exception: self.prepare() diff --git a/pyload/plugin/internal/SimpleHoster.py b/pyload/plugin/internal/SimpleHoster.py index 75f54c767..d07eca2a1 100644 --- a/pyload/plugin/internal/SimpleHoster.py +++ b/pyload/plugin/internal/SimpleHoster.py @@ -244,16 +244,16 @@ def secondsToMidnight(gmt=0): class SimpleHoster(Hoster): - __name__ = "SimpleHoster" - __type__ = "hoster" - __version__ = "1.31" + __name = "SimpleHoster" + __type = "hoster" + __version = "1.31" - __pattern__ = r'^unmatchable$' - __config__ = [("use_premium", "bool", "Use premium account if available", True)] + __pattern = r'^unmatchable$' + __config = [("use_premium", "bool", "Use premium account if available", True)] - __description__ = """Simple hoster plugin""" - __license__ = "GPLv3" - __authors__ = [("Walter Purcaro", "vuolter@gmail.com" )] + __description = """Simple hoster plugin""" + __license = "GPLv3" + __authors = [("Walter Purcaro", "vuolter@gmail.com" )] """ @@ -338,7 +338,7 @@ class SimpleHoster(Hoster): online = False if info['status'] != 2 else True try: - info['pattern'] = re.match(cls.__pattern__, url).groupdict() #: pattern groups will be saved here + info['pattern'] = re.match(cls.__pattern, url).groupdict() #: pattern groups will be saved here except Exception: info['pattern'] = {} @@ -437,8 +437,8 @@ class SimpleHoster(Hoster): set_cookies(self.req.cj, self.COOKIES) if (self.MULTI_HOSTER - and (self.__pattern__ != self.core.pluginManager.hosterPlugins[self.__name__]['pattern'] - or re.match(self.__pattern__, self.pyfile.url) is None)): + and (self.__pattern != self.core.pluginManager.hosterPlugins[self.__name]['pattern'] + or re.match(self.__pattern, self.pyfile.url) is None)): self.multihost = True return @@ -750,7 +750,7 @@ class SimpleHoster(Hoster): return self.premium = False self.account = None - self.req = self.core.requestFactory.getRequest(self.__name__) + self.req = self.core.requestFactory.getRequest(self.__name) self.retries = 0 raise Retry(_("Fallback to free download")) diff --git a/pyload/plugin/internal/XFSAccount.py b/pyload/plugin/internal/XFSAccount.py index 1f2d2b180..13c2351ce 100644 --- a/pyload/plugin/internal/XFSAccount.py +++ b/pyload/plugin/internal/XFSAccount.py @@ -10,13 +10,13 @@ from pyload.plugin.internal.SimpleHoster import parseHtmlForm, set_cookies class XFSAccount(Account): - __name__ = "XFSAccount" - __type__ = "account" - __version__ = "0.36" + __name = "XFSAccount" + __type = "account" + __version = "0.36" - __description__ = """XFileSharing account plugin""" - __license__ = "GPLv3" - __authors__ = [("zoidberg" , "zoidberg@mujmail.cz"), + __description = """XFileSharing account plugin""" + __license = "GPLv3" + __authors = [("zoidberg" , "zoidberg@mujmail.cz"), ("Walter Purcaro", "vuolter@gmail.com" )] diff --git a/pyload/plugin/internal/XFSCrypter.py b/pyload/plugin/internal/XFSCrypter.py index 1a03b69d0..44b4ed724 100644 --- a/pyload/plugin/internal/XFSCrypter.py +++ b/pyload/plugin/internal/XFSCrypter.py @@ -4,15 +4,15 @@ from pyload.plugin.internal.SimpleCrypter import SimpleCrypter class XFSCrypter(SimpleCrypter): - __name__ = "XFSCrypter" - __type__ = "crypter" - __version__ = "0.06" + __name = "XFSCrypter" + __type = "crypter" + __version = "0.06" - __pattern__ = r'^unmatchable$' + __pattern = r'^unmatchable$' - __description__ = """XFileSharing decrypter plugin""" - __license__ = "GPLv3" - __authors__ = [("Walter Purcaro", "vuolter@gmail.com")] + __description = """XFileSharing decrypter plugin""" + __license = "GPLv3" + __authors = [("Walter Purcaro", "vuolter@gmail.com")] HOSTER_DOMAIN = None @@ -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.__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 fc48d6229..05b26bebe 100644 --- a/pyload/plugin/internal/XFSHoster.py +++ b/pyload/plugin/internal/XFSHoster.py @@ -12,15 +12,15 @@ from pyload.utils import html_unescape class XFSHoster(SimpleHoster): - __name__ = "XFSHoster" - __type__ = "hoster" - __version__ = "0.45" + __name = "XFSHoster" + __type = "hoster" + __version = "0.45" - __pattern__ = r'^unmatchable$' + __pattern = r'^unmatchable$' - __description__ = """XFileSharing hoster plugin""" - __license__ = "GPLv3" - __authors__ = [("zoidberg" , "zoidberg@mujmail.cz"), + __description = """XFileSharing hoster plugin""" + __license = "GPLv3" + __authors = [("zoidberg" , "zoidberg@mujmail.cz"), ("stickell" , "l.stickell@yahoo.it"), ("Walter Purcaro", "vuolter@gmail.com" )] @@ -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.__name) if account and hasattr(account, "HOSTER_DOMAIN") and account.HOSTER_DOMAIN: self.HOSTER_DOMAIN = account.HOSTER_DOMAIN |