summaryrefslogtreecommitdiffstats
path: root/pyload/plugins/internal
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-12-10 19:07:53 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-12-10 19:07:53 +0100
commit2439bc22671dde697817291b721bfddb792a93b4 (patch)
treedad4615b7f1d664263af6a85392282329aa0b8e0 /pyload/plugins/internal
parentRevert plugin directory structure (diff)
downloadpyload-2439bc22671dde697817291b721bfddb792a93b4.tar.xz
Fix plugins key attributes
Diffstat (limited to 'pyload/plugins/internal')
-rw-r--r--pyload/plugins/internal/AbstractExtractor.py10
-rw-r--r--pyload/plugins/internal/BasePlugin.py14
-rw-r--r--pyload/plugins/internal/DeadCrypter.py14
-rw-r--r--pyload/plugins/internal/DeadHoster.py14
-rw-r--r--pyload/plugins/internal/MultiHoster.py32
-rw-r--r--pyload/plugins/internal/SimpleCrypter.py16
-rw-r--r--pyload/plugins/internal/SimpleHoster.py20
-rw-r--r--pyload/plugins/internal/UnRar.py10
-rw-r--r--pyload/plugins/internal/UnZip.py10
-rw-r--r--pyload/plugins/internal/UpdateManager.py38
-rw-r--r--pyload/plugins/internal/XFSAccount.py12
-rw-r--r--pyload/plugins/internal/XFSCrypter.py14
-rw-r--r--pyload/plugins/internal/XFSHoster.py14
13 files changed, 109 insertions, 109 deletions
diff --git a/pyload/plugins/internal/AbstractExtractor.py b/pyload/plugins/internal/AbstractExtractor.py
index 5e09c6755..b4fd10895 100644
--- a/pyload/plugins/internal/AbstractExtractor.py
+++ b/pyload/plugins/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/plugins/internal/BasePlugin.py b/pyload/plugins/internal/BasePlugin.py
index a3f22b344..7a29391b6 100644
--- a/pyload/plugins/internal/BasePlugin.py
+++ b/pyload/plugins/internal/BasePlugin.py
@@ -11,15 +11,15 @@ from pyload.plugins.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/plugins/internal/DeadCrypter.py b/pyload/plugins/internal/DeadCrypter.py
index 427996e51..b1e963290 100644
--- a/pyload/plugins/internal/DeadCrypter.py
+++ b/pyload/plugins/internal/DeadCrypter.py
@@ -8,15 +8,15 @@ from pyload.plugins.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/plugins/internal/DeadHoster.py b/pyload/plugins/internal/DeadHoster.py
index 3930908d3..b7f930fc5 100644
--- a/pyload/plugins/internal/DeadHoster.py
+++ b/pyload/plugins/internal/DeadHoster.py
@@ -8,15 +8,15 @@ from pyload.plugins.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/plugins/internal/MultiHoster.py b/pyload/plugins/internal/MultiHoster.py
index e4783395d..7644d85ff 100644
--- a/pyload/plugins/internal/MultiHoster.py
+++ b/pyload/plugins/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/plugins/internal/SimpleCrypter.py b/pyload/plugins/internal/SimpleCrypter.py
index 405aff9c5..e9de95073 100644
--- a/pyload/plugins/internal/SimpleCrypter.py
+++ b/pyload/plugins/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/plugins/internal/SimpleHoster.py b/pyload/plugins/internal/SimpleHoster.py
index aafbdc8bd..af8a53534 100644
--- a/pyload/plugins/internal/SimpleHoster.py
+++ b/pyload/plugins/internal/SimpleHoster.py
@@ -118,15 +118,15 @@ def _isDirectLink(self, url, resumable=True):
class SimpleHoster(Hoster):
- __name__ = "SimpleHoster"
- __type__ = "hoster"
- __version__ = "0.71"
+ __name = "SimpleHoster"
+ __type = "hoster"
+ __version = "0.71"
- __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")]
@@ -232,7 +232,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
@@ -288,8 +288,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/plugins/internal/UnRar.py b/pyload/plugins/internal/UnRar.py
index 90216222b..97785fa97 100644
--- a/pyload/plugins/internal/UnRar.py
+++ b/pyload/plugins/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/plugins/internal/UnZip.py b/pyload/plugins/internal/UnZip.py
index 17c321530..ea8bcc283 100644
--- a/pyload/plugins/internal/UnZip.py
+++ b/pyload/plugins/internal/UnZip.py
@@ -7,12 +7,12 @@ from pyload.plugins.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/plugins/internal/UpdateManager.py b/pyload/plugins/internal/UpdateManager.py
index ee45cf7a2..87e86f17f 100644
--- a/pyload/plugins/internal/UpdateManager.py
+++ b/pyload/plugins/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 ),
- ("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 )]
+ __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 coreReady(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 unload(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.plugins.") or
- m.__name__.startswith("userplugins.")) and
- m.__name__.count(".") >= 2, sys.modules.itervalues()
+ lambda m: m and (m.__name.startswith("pyload.plugins.") 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/plugins/internal/XFSAccount.py b/pyload/plugins/internal/XFSAccount.py
index 7da060c4b..937ed1831 100644
--- a/pyload/plugins/internal/XFSAccount.py
+++ b/pyload/plugins/internal/XFSAccount.py
@@ -10,13 +10,13 @@ from pyload.plugins.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/plugins/internal/XFSCrypter.py b/pyload/plugins/internal/XFSCrypter.py
index 2de39f4bc..280f87654 100644
--- a/pyload/plugins/internal/XFSCrypter.py
+++ b/pyload/plugins/internal/XFSCrypter.py
@@ -4,15 +4,15 @@ from pyload.plugins.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/plugins/internal/XFSHoster.py b/pyload/plugins/internal/XFSHoster.py
index b215b8211..1f9671402 100644
--- a/pyload/plugins/internal/XFSHoster.py
+++ b/pyload/plugins/internal/XFSHoster.py
@@ -14,15 +14,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")]