diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-03-26 12:44:15 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-03-26 12:44:15 +0100 |
commit | ce103ce1e60661f7bcdf6a033335134de61d48b1 (patch) | |
tree | 29b9421062cc8341dc10b6ca65e9a64802c3db71 /pyload/plugin/internal | |
parent | .min.css -> .css (diff) | |
download | pyload-ce103ce1e60661f7bcdf6a033335134de61d48b1.tar.xz |
Prepare to merging
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 | 16 | ||||
-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 | 20 | ||||
-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, 92 insertions, 92 deletions
diff --git a/pyload/plugin/internal/BasePlugin.py b/pyload/plugin/internal/BasePlugin.py index 0b9e31ec0..103e0d5cb 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.34" + __name__ = "BasePlugin" + __type__ = "hoster" + __version__ = "0.34" - __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 f33442f5f..2beccfcc5 100644 --- a/pyload/plugin/internal/MultiHook.py +++ b/pyload/plugin/internal/MultiHook.py @@ -9,11 +9,11 @@ from pyload.utils import decode, remove_chars class MultiHook(Hook): - __name = "MultiHook" - __type = "hook" - __version = "0.37" + __name__ = "MultiHook" + __type__ = "hook" + __version__ = "0.37" - __config = [("pluginmode" , "all;listed;unlisted", "Use for plugins" , "all"), + __config__ = [("pluginmode" , "all;listed;unlisted", "Use for plugins" , "all"), ("pluginlist" , "str" , "Plugin list (comma separated)" , "" ), ("revertfailed" , "bool" , "Revert to standard download if fails", True ), ("retry" , "int" , "Number of retries before revert" , 10 ), @@ -21,9 +21,9 @@ class MultiHook(Hook): ("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")] @@ -66,16 +66,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): @@ -250,8 +250,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) @@ -278,7 +278,7 @@ 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 ff80b1982..ed425ffaa 100644 --- a/pyload/plugin/internal/MultiHoster.py +++ b/pyload/plugin/internal/MultiHoster.py @@ -6,15 +6,15 @@ from pyload.plugin.internal.SimpleHoster import SimpleHoster, replace_patterns, class MultiHoster(SimpleHoster): - __name = "MultiHoster" - __type = "hoster" - __version = "0.37" + __name__ = "MultiHoster" + __type__ = "hoster" + __version__ = "0.37" - __pattern = r'^unmatchable$' + __pattern__ = r'^unmatchable$' - __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 @@ -41,7 +41,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 3e1215264..e4b8874f3 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_package", "bool", "Create a subfolder for each package", True)] - __description = """Simple decrypter plugin""" - __license = "GPLv3" - __authors = [("stickell", "l.stickell@yahoo.it"), + __description__ = """Simple decrypter plugin""" + __license__ = "GPLv3" + __authors__ = [("stickell", "l.stickell@yahoo.it"), ("zoidberg", "zoidberg@mujmail.cz"), ("Walter Purcaro", "vuolter@gmail.com")] diff --git a/pyload/plugin/internal/SimpleDereferer.py b/pyload/plugin/internal/SimpleDereferer.py index 683e5f81d..6d323b4b0 100644 --- a/pyload/plugin/internal/SimpleDereferer.py +++ b/pyload/plugin/internal/SimpleDereferer.py @@ -9,17 +9,17 @@ from pyload.plugin.internal.SimpleHoster import fileUrl, set_cookies class SimpleDereferer(Crypter): - __name = "SimpleDereferer" - __type = "crypter" - __version = "0.07" + __name__ = "SimpleDereferer" + __type__ = "crypter" + __version__ = "0.07" - __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_package", "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 77d21f2d7..ac7f5aa4d 100644 --- a/pyload/plugin/internal/SimpleHoster.py +++ b/pyload/plugin/internal/SimpleHoster.py @@ -244,15 +244,15 @@ def secondsToMidnight(gmt=0): class SimpleHoster(Hoster): - __name = "SimpleHoster" - __type = "hoster" - __version = "1.15" + __name__ = "SimpleHoster" + __type__ = "hoster" + __version__ = "1.15" - __pattern = r'^unmatchable$' + __pattern__ = r'^unmatchable$' - __description = """Simple hoster plugin""" - __license = "GPLv3" - __authors = [("zoidberg", "zoidberg@mujmail.cz"), + __description__ = """Simple hoster plugin""" + __license__ = "GPLv3" + __authors__ = [("zoidberg", "zoidberg@mujmail.cz"), ("stickell", "l.stickell@yahoo.it"), ("Walter Purcaro", "vuolter@gmail.com")] @@ -339,7 +339,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'] = {} @@ -435,8 +435,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 diff --git a/pyload/plugin/internal/XFSAccount.py b/pyload/plugin/internal/XFSAccount.py index b9f5eec3a..2e6b7dc50 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 44b4ed724..1a03b69d0 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 6c98a36e7..b0a5aff0f 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.44" + __name__ = "XFSHoster" + __type__ = "hoster" + __version__ = "0.44" - __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 |