diff options
author | Walter Purcaro <vuolter@gmail.com> | 2015-02-16 03:40:45 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2015-02-16 03:40:45 +0100 |
commit | fcead1870013b6a970eca7878a66dbe783c80ea3 (patch) | |
tree | 9837d3b2cacba2f5d1a4c620b1cd02f26571b454 /pyload/plugin/internal | |
parent | Init cosmetics (diff) | |
download | pyload-fcead1870013b6a970eca7878a66dbe783c80ea3.tar.xz |
Partially revert acc46fc3497a66a427b795b4a22c6e71d69185a1
Diffstat (limited to 'pyload/plugin/internal')
-rw-r--r-- | pyload/plugin/internal/AbstractExtractor.py | 10 | ||||
-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/MultiHoster.py | 32 | ||||
-rw-r--r-- | pyload/plugin/internal/SimpleCrypter.py | 16 | ||||
-rw-r--r-- | pyload/plugin/internal/SimpleHoster.py | 20 | ||||
-rw-r--r-- | pyload/plugin/internal/UnRar.py | 10 | ||||
-rw-r--r-- | pyload/plugin/internal/UnZip.py | 10 | ||||
-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 | 14 | ||||
-rw-r--r-- | pyload/plugin/internal/XFSHoster.py | 14 |
13 files changed, 105 insertions, 105 deletions
diff --git a/pyload/plugin/internal/AbstractExtractor.py b/pyload/plugin/internal/AbstractExtractor.py index b4fd10895..5e09c6755 100644 --- a/pyload/plugin/internal/AbstractExtractor.py +++ b/pyload/plugin/internal/AbstractExtractor.py @@ -13,12 +13,12 @@ class WrongPassword(Exception): class AbtractExtractor(object): - __name = "AbtractExtractor" - __version = "0.10" + __name__ = "AbtractExtractor" + __version__ = "0.10" - __description = """Abtract extractor plugin""" - __license = "GPLv3" - __authors = [("pyLoad Team", "admin@pyload.org")] + __description__ = """Abtract extractor plugin""" + __license__ = "GPLv3" + __authors__ = [("pyLoad Team", "admin@pyload.org")] @staticmethod diff --git a/pyload/plugin/internal/BasePlugin.py b/pyload/plugin/internal/BasePlugin.py index f4b8e8997..954fe4e22 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.25" + __name__ = "BasePlugin" + __type__ = "hoster" + __version__ = "0.25" - __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 fcc2e6eb2..97d99021e 100644 --- a/pyload/plugin/internal/DeadCrypter.py +++ b/pyload/plugin/internal/DeadCrypter.py @@ -8,15 +8,15 @@ from pyload.plugin.internal.SimpleCrypter import create_getInfo 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 d8f57801a..27036a139 100644 --- a/pyload/plugin/internal/DeadHoster.py +++ b/pyload/plugin/internal/DeadHoster.py @@ -8,15 +8,15 @@ from pyload.plugin.internal.SimpleHoster import create_getInfo 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/MultiHoster.py b/pyload/plugin/internal/MultiHoster.py index 93fa13561..3b45801f8 100644 --- a/pyload/plugin/internal/MultiHoster.py +++ b/pyload/plugin/internal/MultiHoster.py @@ -7,13 +7,13 @@ from pyload.utils import remove_chars class MultiHoster(Addon): - __name = "MultiHoster" - __type = "addon" - __version = "0.20" + __name__ = "MultiHoster" + __type__ = "addon" + __version__ = "0.20" - __description = """Base multi-hoster plugin""" - __license = "GPLv3" - __authors = [("pyLoad Team", "admin@pyload.org")] + __description__ = """Base multi-hoster plugin""" + __license__ = "GPLv3" + __authors__ = [("pyLoad Team", "admin@pyload.org")] HOSTER_REPLACEMENTS = [("1fichier.com", "onefichier.com"), ("2shared.com", "twoshared.com"), @@ -142,15 +142,15 @@ class MultiHoster(Addon): self.logError(_("No Hoster loaded")) return - module = self.core.pluginManager.getPlugin(self.__type, self.__name) - klass = getattr(module, self.__name) + module = self.core.pluginManager.getPlugin(self.__type__, self.__name__) + klass = getattr(module, self.__name__) # inject plugin plugin self.logDebug("Overwritten Hosters", ", ".join(sorted(self.supported))) for hoster in self.supported: dict = self.core.pluginManager.hosterPlugins[hoster] dict['new_module'] = module - dict['new_name'] = self.__name + dict['new_name'] = self.__name__ if excludedList: self.logInfo(_("The following hosters were not overwritten - account exists"), ", ".join(sorted(excludedList))) @@ -160,12 +160,12 @@ class MultiHoster(Addon): # create new regexp regexp = r'.*(%s).*' % "|".join([x.replace(".", "\.") for x in self.new_supported]) - if hasattr(klass, "__pattern") and isinstance(klass.__pattern, basestring) and '://' in klass.__pattern: - regexp = r'%s|%s' % (klass.__pattern, regexp) + if hasattr(klass, "__pattern__") and isinstance(klass.__pattern__, basestring) and '://' in klass.__pattern__: + regexp = r'%s|%s' % (klass.__pattern__, regexp) self.logDebug("Regexp", regexp) - dict = self.core.pluginManager.hosterPlugins[self.__name] + dict = self.core.pluginManager.hosterPlugins[self.__name__] dict['pattern'] = regexp dict['re'] = re.compile(regexp) @@ -186,9 +186,9 @@ class MultiHoster(Addon): self.unloadHoster(hoster) # reset pattern - klass = getattr(self.core.pluginManager.getPlugin(self.__type, self.__name), self.__name) - dict = self.core.pluginManager.hosterPlugins[self.__name] - dict['pattern'] = getattr(klass, "__pattern", r'^unmatchable$') + klass = getattr(self.core.pluginManager.getPlugin(self.__type__, self.__name__), self.__name__) + dict = self.core.pluginManager.hosterPlugins[self.__name__] + dict['pattern'] = getattr(klass, "__pattern__", r'^unmatchable$') dict['re'] = re.compile(dict['pattern']) @@ -196,7 +196,7 @@ class MultiHoster(Addon): """remove plugin override if download fails but not if file is offline/temp.offline""" if pyfile.hasStatus("failed") and self.getConfig("unloadFailing", True): hdict = self.core.pluginManager.hosterPlugins[pyfile.pluginname] - if "new_name" in hdict and hdict['new_name'] == self.__name: + if "new_name" in hdict and hdict['new_name'] == self.__name__: self.logDebug("Unload MultiHoster", pyfile.pluginname, hdict) self.unloadHoster(pyfile.pluginname) pyfile.setStatus("queued") diff --git a/pyload/plugin/internal/SimpleCrypter.py b/pyload/plugin/internal/SimpleCrypter.py index 30b455545..5115692ad 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.32" + __name__ = "SimpleCrypter" + __type__ = "crypter" + __version__ = "0.32" - __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/SimpleHoster.py b/pyload/plugin/internal/SimpleHoster.py index 9355cfe86..84c47f3b4 100644 --- a/pyload/plugin/internal/SimpleHoster.py +++ b/pyload/plugin/internal/SimpleHoster.py @@ -118,15 +118,15 @@ def _isDirectLink(self, url, resumable=True): class SimpleHoster(Hoster): - __name = "SimpleHoster" - __type = "hoster" - __version = "0.72" + __name__ = "SimpleHoster" + __type__ = "hoster" + __version__ = "0.72" - __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")] @@ -231,7 +231,7 @@ class SimpleHoster(Hoster): else: try: - info['pattern'] = re.match(cls.__pattern, url).groupdict() #: pattern groups will be saved here, please save api stuff to info['api'] + info['pattern'] = re.match(cls.__pattern__, url).groupdict() #: pattern groups will be saved here, please save api stuff to info['api'] except Exception: pass @@ -287,8 +287,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.logInfo("Multi hoster detected") diff --git a/pyload/plugin/internal/UnRar.py b/pyload/plugin/internal/UnRar.py index 404ee906b..20da4177e 100644 --- a/pyload/plugin/internal/UnRar.py +++ b/pyload/plugin/internal/UnRar.py @@ -21,12 +21,12 @@ def renice(pid, value): class UnRar(AbtractExtractor): - __name = "UnRar" - __version = "0.19" + __name__ = "UnRar" + __version__ = "0.19" - __description = """Rar extractor plugin""" - __license = "GPLv3" - __authors = [("RaNaN", "RaNaN@pyload.org")] + __description__ = """Rar extractor plugin""" + __license__ = "GPLv3" + __authors__ = [("RaNaN", "RaNaN@pyload.org")] CMD = "unrar" diff --git a/pyload/plugin/internal/UnZip.py b/pyload/plugin/internal/UnZip.py index 8cf71f659..dded6158e 100644 --- a/pyload/plugin/internal/UnZip.py +++ b/pyload/plugin/internal/UnZip.py @@ -7,12 +7,12 @@ from pyload.plugin.internal.AbstractExtractor import AbtractExtractor class UnZip(AbtractExtractor): - __name = "UnZip" - __version = "0.10" + __name__ = "UnZip" + __version__ = "0.10" - __description = """Zip extractor plugin""" - __license = "GPLv3" - __authors = [("RaNaN", "RaNaN@pyload.org")] + __description__ = """Zip extractor plugin""" + __license__ = "GPLv3" + __authors__ = [("RaNaN", "RaNaN@pyload.org")] @staticmethod diff --git a/pyload/plugin/internal/UpdateManager.py b/pyload/plugin/internal/UpdateManager.py index 0c40b4192..7bbfc0c79 100644 --- a/pyload/plugin/internal/UpdateManager.py +++ b/pyload/plugin/internal/UpdateManager.py @@ -12,19 +12,19 @@ from pyload.utils import safe_join class UpdateManager(Addon): - __name = "UpdateManager" - __type = "addon" - __version = "0.40" + __name__ = "UpdateManager" + __type__ = "addon" + __version__ = "0.40" - __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 ), ("reloadplugins", "bool" , "Monitor plugins for code changes (debug mode only)", True ), ("nodebugupdate", "bool" , "Don't check for updates in debug mode" , True )] - __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"] @@ -51,13 +51,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): @@ -79,15 +79,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") @@ -173,7 +173,7 @@ class UpdateManager(Addon): exitcode = 0 updated = [] - vre = re.compile(r'__version.*=.*("|\')([\d.]+)') + vre = re.compile(r'__version__.*=.*("|\')([\d.]+)') url = updates[0] schema = updates[1].split('|') diff --git a/pyload/plugin/internal/XFSAccount.py b/pyload/plugin/internal/XFSAccount.py index 388cda26c..7a9db0e79 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.32" + __name__ = "XFSAccount" + __type__ = "account" + __version__ = "0.32" - __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 6440d328a..a3053b60c 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.04" + __name__ = "XFSCrypter" + __type__ = "crypter" + __version__ = "0.04" - __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 dfc923f69..0a7853966 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.27" + __name__ = "XFSHoster" + __type__ = "hoster" + __version__ = "0.27" - __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")] |