diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-04-13 08:21:50 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-04-13 08:21:50 +0200 |
commit | 486adc1874e463b1563ad2394b216faff388b10d (patch) | |
tree | 58009056cb67e35930d49a9dd6af45adf6a8d434 /pyload/plugin/internal | |
parent | Fix https://github.com/pyload/pyload/issues/1349 (diff) | |
download | pyload-486adc1874e463b1563ad2394b216faff388b10d.tar.xz |
Prepare plugins to merging from stable
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 | 20 | ||||
-rw-r--r-- | pyload/plugin/internal/MultiHoster.py | 18 | ||||
-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 | 14 | ||||
-rw-r--r-- | pyload/plugin/internal/XFSHoster.py | 14 |
11 files changed, 89 insertions, 89 deletions
diff --git a/pyload/plugin/internal/BasePlugin.py b/pyload/plugin/internal/BasePlugin.py index 947c0fb3b..0b6e8f102 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 daa7e1a0d..ddeb0431d 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 2e57decdb..1596943ae 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 acf17f6dc..e15d5afda 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")] @@ -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 a7e74b2ff..5f70335dd 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 diff --git a/pyload/plugin/internal/SimpleCrypter.py b/pyload/plugin/internal/SimpleCrypter.py index 4c19270fd..472488268 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 fc50db153..e24a7b836 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 08fef5a70..d83bbb625 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")] """ Info patterns should be defined by each hoster: @@ -334,7 +334,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'] = {} @@ -431,8 +431,8 @@ class SimpleHoster(Hoster): set_cookies(self.req.cj, self.COOKIES) if (self.MULTI_HOSTER - and (self.__pattern != self.core.pluginManager.hosterPlugins[self.__class__.__name__]['pattern'] - or re.match(self.__pattern, self.pyfile.url) is None)): + 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 @@ -726,7 +726,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 13c2351ce..1f2d2b180 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 6a3f09e55..bb2dac09e 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 diff --git a/pyload/plugin/internal/XFSHoster.py b/pyload/plugin/internal/XFSHoster.py index 532d9bea4..58bcf0e09 100644 --- a/pyload/plugin/internal/XFSHoster.py +++ b/pyload/plugin/internal/XFSHoster.py @@ -13,15 +13,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")] |