diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-04-13 10:29:55 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-04-13 10:29:55 +0200 |
commit | d60040cdc406b0541f0b3f9681a09894f845ba2b (patch) | |
tree | 69be3f4730c9ef4cf9f98f5b9ae17157a88abc85 /pyload/plugin/internal | |
parent | Cleanup + fixup + new lib (diff) | |
download | pyload-d60040cdc406b0541f0b3f9681a09894f845ba2b.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 | 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 a0745f99a..996dc8e76 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.41" + __name = "BasePlugin" + __type = "hoster" + __version = "0.41" - __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 4ca158c24..2b125d4a1 100644 --- a/pyload/plugin/internal/MultiHook.py +++ b/pyload/plugin/internal/MultiHook.py @@ -9,18 +9,18 @@ from pyload.utils import decode, remove_chars class MultiHook(Hook): - __name__ = "MultiHook" - __type__ = "hook" - __version__ = "0.44" + __name = "MultiHook" + __type = "hook" + __version = "0.44" - __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 5f70335dd..a7e74b2ff 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 d0380c0d9..ba5cb991c 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 a224c1e40..f3596b32c 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.11" + __name = "SimpleDereferer" + __type = "crypter" + __version = "0.11" - __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 fa48f1e25..79b3cac1a 100644 --- a/pyload/plugin/internal/SimpleHoster.py +++ b/pyload/plugin/internal/SimpleHoster.py @@ -242,16 +242,16 @@ def secondsToMidnight(gmt=0): class SimpleHoster(Hoster): - __name__ = "SimpleHoster" - __type__ = "hoster" - __version__ = "1.37" + __name = "SimpleHoster" + __type = "hoster" + __version = "1.37" - __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: @@ -333,7 +333,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'] = {} @@ -430,8 +430,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 @@ -724,7 +724,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 bb2dac09e..6a3f09e55 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 db2d2e1d0..d2d5fb0dd 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.46" + __name = "XFSHoster" + __type = "hoster" + __version = "0.46" - __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")] |