diff options
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/UpdateManager.py | 30 | ||||
-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 |
12 files changed, 107 insertions, 107 deletions
diff --git a/pyload/plugin/internal/BasePlugin.py b/pyload/plugin/internal/BasePlugin.py index 103e0d5cb..0b9e31ec0 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 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 2beccfcc5..f33442f5f 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 ed425ffaa..ff80b1982 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 e4b8874f3..3e1215264 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 6d323b4b0..683e5f81d 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 ac7f5aa4d..77d21f2d7 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/UpdateManager.py b/pyload/plugin/internal/UpdateManager.py index ff692b4ae..d84ccebdf 100644 --- a/pyload/plugin/internal/UpdateManager.py +++ b/pyload/plugin/internal/UpdateManager.py @@ -14,26 +14,26 @@ from pyload.utils import safe_join class UpdateManager(Addon): - __name__ = "UpdateManager" - __type__ = "addon" - __version__ = "0.43" + __name = "UpdateManager" + __type = "addon" + __version = "0.43" - __config__ = [("activated" , "bool" , "Activated" , True ), + __config = [("activated" , "bool" , "Activated" , True ), ("mode" , "pyLoad + plugins;plugins only", "Check updates for" , "pyLoad + plugins"), ("interval" , "int" , "Check interval in hours" , 8 ), ("autorestart" , "bool" , "Automatically restart pyLoad when required" , True ), ("reloadplugins", "bool" , "Monitor plugins for code changes in debug mode", True ), ("nodebugupdate", "bool" , "Don't check for updates in debug mode" , False )] - __description__ = """Check for updates""" - __license__ = "GPLv3" - __authors__ = [("Walter Purcaro", "vuolter@gmail.com")] + __description = """Check for updates""" + __license = "GPLv3" + __authors = [("Walter Purcaro", "vuolter@gmail.com")] # event_list = ["pluginConfigChanged"] SERVER_URL = "http://updatemanager.pyload.org" - VERSION = re.compile(r'__version__.*=.*("|\')([\d.]+)') + VERSION = re.compile(r'__version.*=.*("|\')([\d.]+)') MIN_INTERVAL = 3 * 60 * 60 #: 3h minimum check interval (value is in seconds) @@ -55,13 +55,13 @@ class UpdateManager(Addon): def activate(self): - self.pluginConfigChanged(self.__name__, "interval", self.getConfig("interval")) - x = lambda: self.pluginConfigChanged(self.__name__, "reloadplugins", self.getConfig("reloadplugins")) + self.pluginConfigChanged(self.__name, "interval", self.getConfig("interval")) + x = lambda: self.pluginConfigChanged(self.__name, "reloadplugins", self.getConfig("reloadplugins")) self.core.scheduler.addJob(10, x, threaded=False) def deactivate(self): - self.pluginConfigChanged(self.__name__, "reloadplugins", False) + self.pluginConfigChanged(self.__name, "reloadplugins", False) def setup(self): @@ -83,15 +83,15 @@ class UpdateManager(Addon): def autoreloadPlugins(self): """ reload and reindex all modified plugins """ modules = filter( - lambda m: m and (m.__name__.startswith("pyload.plugin.") or - m.__name__.startswith("userplugins.")) and - m.__name__.count(".") >= 2, sys.modules.itervalues() + lambda m: m and (m.__name.startswith("pyload.plugin.") or + m.__name.startswith("userplugins.")) and + m.__name.count(".") >= 2, sys.modules.itervalues() ) reloads = [] for m in modules: - root, type, name = m.__name__.rsplit(".", 2) + root, type, name = m.__name.rsplit(".", 2) id = (type, name) if type in self.core.pluginManager.plugins: f = m.__file__.replace(".pyc", ".py") diff --git a/pyload/plugin/internal/XFSAccount.py b/pyload/plugin/internal/XFSAccount.py index 2e6b7dc50..b9f5eec3a 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 b0a5aff0f..6c98a36e7 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 |