summaryrefslogtreecommitdiffstats
path: root/module/plugins/internal
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/internal')
-rw-r--r--module/plugins/internal/Account.py8
-rw-r--r--module/plugins/internal/Addon.py3
-rw-r--r--module/plugins/internal/Base.py20
-rw-r--r--module/plugins/internal/Captcha.py6
-rw-r--r--module/plugins/internal/CaptchaService.py6
-rw-r--r--module/plugins/internal/Container.py3
-rw-r--r--module/plugins/internal/Crypter.py5
-rw-r--r--module/plugins/internal/DeadCrypter.py3
-rw-r--r--module/plugins/internal/DeadHoster.py3
-rw-r--r--module/plugins/internal/Extractor.py6
-rw-r--r--module/plugins/internal/Hoster.py7
-rw-r--r--module/plugins/internal/MultiCrypter.py7
-rw-r--r--module/plugins/internal/MultiHoster.py15
-rw-r--r--module/plugins/internal/OCR.py12
-rw-r--r--module/plugins/internal/Plugin.py23
-rw-r--r--module/plugins/internal/SevenZip.py2
-rw-r--r--module/plugins/internal/SimpleHoster.py13
-rw-r--r--module/plugins/internal/UnRar.py4
-rw-r--r--module/plugins/internal/UnZip.py2
-rw-r--r--module/plugins/internal/XFSAccount.py2
-rw-r--r--module/plugins/internal/XFSCrypter.py7
-rw-r--r--module/plugins/internal/XFSHoster.py7
22 files changed, 83 insertions, 81 deletions
diff --git a/module/plugins/internal/Account.py b/module/plugins/internal/Account.py
index 410a02671..8b80a0d5c 100644
--- a/module/plugins/internal/Account.py
+++ b/module/plugins/internal/Account.py
@@ -11,7 +11,7 @@ from module.utils import compare_time, lock
class Account(Plugin):
- __name = "Account"
+ __name__ = "Account"
__type__ = "account"
__version__ = "0.61"
__status__ = "testing"
@@ -134,7 +134,7 @@ class Account(Plugin):
self.log_info(_("Relogin user `%s`...") % self.user)
self.clean()
- self.req = self.pyload.requestFactory.getRequest(self.__name__, self.user)
+ self.req = self.pyload.requestFactory.getRequest(self.classname, self.user)
self.sync()
@@ -335,7 +335,7 @@ class Account(Plugin):
'premium' : None,
'timestamp' : 0,
'trafficleft': None,
- 'type' : self.__name,
+ 'type' : self.__name__,
'valid' : None,
'validuntil' : None}
@@ -451,7 +451,7 @@ class Account(Plugin):
if not self.logged:
self.relogin()
else:
- self.req = self.pyload.requestFactory.getRequest(self.__name__, self.user)
+ self.req = self.pyload.requestFactory.getRequest(self.classname, self.user)
return True
diff --git a/module/plugins/internal/Addon.py b/module/plugins/internal/Addon.py
index 12a4aed95..e41325a80 100644
--- a/module/plugins/internal/Addon.py
+++ b/module/plugins/internal/Addon.py
@@ -21,8 +21,7 @@ def threaded(fn):
class Addon(Plugin):
- __name = "Addon"
- __type = "addon"
+ __name__ = "Addon"
__type__ = "hook" #@TODO: Change to `addon` in 0.4.10
__version__ = "0.13"
__status__ = "testing"
diff --git a/module/plugins/internal/Base.py b/module/plugins/internal/Base.py
index 578b12f7f..6f0a902f3 100644
--- a/module/plugins/internal/Base.py
+++ b/module/plugins/internal/Base.py
@@ -45,13 +45,14 @@ def check_abort(fn):
class Base(Plugin):
- __name = "Base"
+ __name__ = "Base"
__type__ = "base"
__version__ = "0.11"
__status__ = "testing"
__pattern__ = r'^unmatchable$'
- __config__ = [("use_premium", "bool", "Use premium account if available", True)]
+ __config__ = [("activated" , "bool", "Activated" , True),
+ ("use_premium", "bool", "Use premium account if available", True)]
__description__ = """Base plugin for Hoster and Crypter"""
__license__ = "GPLv3"
@@ -114,8 +115,7 @@ class Base(Plugin):
@classmethod
def get_info(cls, url="", html=""):
- url = fixurl(url, unquote=True)
-
+ url = fixurl(url, unquote=True)
info = {'name' : parse_name(url),
'pattern': {},
'size' : 0,
@@ -123,7 +123,7 @@ class Base(Plugin):
'url' : replace_patterns(url, cls.URL_REPLACEMENTS)}
try:
- info['pattern'] = re.match(cls.__pattern, url).groupdict()
+ info['pattern'] = re.match(cls.__pattern__, url).groupdict()
except Exception:
pass
@@ -170,10 +170,10 @@ class Base(Plugin):
pass
if self.account:
- self.req = self.pyload.requestFactory.getRequest(self.__name__, self.account.user)
+ self.req = self.pyload.requestFactory.getRequest(self.classname, self.account.user)
self.premium = self.account.info['data']['premium'] #@NOTE: Avoid one unnecessary get_info call by `self.account.premium` here
else:
- self.req = self.pyload.requestFactory.getRequest(self.__name__)
+ self.req = self.pyload.requestFactory.getRequest(self.classname)
self.premium = False
self.setup_base()
@@ -182,7 +182,7 @@ class Base(Plugin):
def load_account(self):
if not self.account:
- self.account = self.pyload.accountManager.getAccountPlugin(self.__name__)
+ self.account = self.pyload.accountManager.getAccountPlugin(self.classname)
if not self.account:
self.account = False
@@ -209,7 +209,7 @@ class Base(Plugin):
self.pyfile.setStatus("starting")
self.log_debug("PROCESS URL " + self.pyfile.url,
- "PLUGIN VERSION %s" % self.__version)
+ "PLUGIN VERSION %s" % self.__version__)
self.process(self.pyfile)
@@ -463,7 +463,7 @@ class Base(Plugin):
except Exception: #: Bad bad bad... rewrite this part in 0.4.10
res = self.load(url,
just_header=True,
- req=self.pyload.requestFactory.getRequest(self.__name__))
+ req=self.pyload.requestFactory.getRequest(self.classname))
header = {'code': req.code}
for line in res.splitlines():
diff --git a/module/plugins/internal/Captcha.py b/module/plugins/internal/Captcha.py
index 070621249..a8f48b5e4 100644
--- a/module/plugins/internal/Captcha.py
+++ b/module/plugins/internal/Captcha.py
@@ -9,7 +9,7 @@ from module.plugins.internal.Plugin import Plugin
class Captcha(Plugin):
- __name = "Captcha"
+ __name__ = "Captcha"
__type__ = "captcha"
__version__ = "0.46"
__status__ = "testing"
@@ -38,8 +38,8 @@ class Captcha(Plugin):
def _log(self, level, plugintype, pluginname, messages):
return self.plugin._log(level,
plugintype,
- self.plugin.__name,
- (self.__name,) + messages)
+ self.plugin.__name__,
+ (self.__name__,) + messages)
def recognize(self, image):
diff --git a/module/plugins/internal/CaptchaService.py b/module/plugins/internal/CaptchaService.py
index 6870e4d81..20dc60427 100644
--- a/module/plugins/internal/CaptchaService.py
+++ b/module/plugins/internal/CaptchaService.py
@@ -4,7 +4,7 @@ from module.plugins.internal.Captcha import Captcha
class CaptchaService(Captcha):
- __name = "CaptchaService"
+ __name__ = "CaptchaService"
__type__ = "captcha"
__version__ = "0.32"
__status__ = "testing"
@@ -23,7 +23,7 @@ class CaptchaService(Captcha):
if self.detect_key(data):
return self.key
else:
- self.fail(_("%s key not found") % self.__name)
+ self.fail(_("%s key not found") % self.__name__)
#@TODO: Recheck in 0.4.10, html is now pyfile.data
@@ -31,7 +31,7 @@ class CaptchaService(Captcha):
if hasattr(self.plugin, "html") and self.plugin.html:
return self.plugin.html
else:
- self.fail(_("%s data not found") % self.__name)
+ self.fail(_("%s data not found") % self.__name__)
def detect_key(self, data=None):
diff --git a/module/plugins/internal/Container.py b/module/plugins/internal/Container.py
index ffae0a990..96c7a450c 100644
--- a/module/plugins/internal/Container.py
+++ b/module/plugins/internal/Container.py
@@ -11,12 +11,13 @@ from module.utils import save_join as fs_join
class Container(Crypter):
- __name = "Container"
+ __name__ = "Container"
__type__ = "container"
__version__ = "0.07"
__status__ = "testing"
__pattern__ = r'^unmatchable$'
+ __config__ = [("activated", "bool", "Activated", True)]
__description__ = """Base container decrypter plugin"""
__license__ = "GPLv3"
diff --git a/module/plugins/internal/Crypter.py b/module/plugins/internal/Crypter.py
index 151d66860..77b5d74e9 100644
--- a/module/plugins/internal/Crypter.py
+++ b/module/plugins/internal/Crypter.py
@@ -6,13 +6,14 @@ from module.utils import save_path as safe_filename
class Crypter(Base):
- __name = "Crypter"
+ __name__ = "Crypter"
__type__ = "crypter"
__version__ = "0.13"
__status__ = "testing"
__pattern__ = r'^unmatchable$'
- __config__ = [("use_premium" , "bool", "Use premium account if available" , True),
+ __config__ = [("activated" , "bool", "Activated" , True),
+ ("use_premium" , "bool", "Use premium account if available" , True),
("use_subfolder" , "bool", "Save package to subfolder" , True), #: Overrides pyload.config.get("general", "folder_per_package")
("subfolder_per_package", "bool", "Create a subfolder for each package", True)]
diff --git a/module/plugins/internal/DeadCrypter.py b/module/plugins/internal/DeadCrypter.py
index 911a7373b..28ae6ffdb 100644
--- a/module/plugins/internal/DeadCrypter.py
+++ b/module/plugins/internal/DeadCrypter.py
@@ -4,12 +4,13 @@ from module.plugins.internal.Crypter import Crypter, create_getInfo
class DeadCrypter(Crypter):
- __name = "DeadCrypter"
+ __name__ = "DeadCrypter"
__type__ = "crypter"
__version__ = "0.09"
__status__ = "testing"
__pattern__ = r'^unmatchable$'
+ __config__ = [("activated", "bool", "Activated", True)]
__description__ = """Crypter is no longer available"""
__license__ = "GPLv3"
diff --git a/module/plugins/internal/DeadHoster.py b/module/plugins/internal/DeadHoster.py
index 2aeceb52f..b7c90ffee 100644
--- a/module/plugins/internal/DeadHoster.py
+++ b/module/plugins/internal/DeadHoster.py
@@ -4,12 +4,13 @@ from module.plugins.internal.Hoster import Hoster, create_getInfo
class DeadHoster(Hoster):
- __name = "DeadHoster"
+ __name__ = "DeadHoster"
__type__ = "hoster"
__version__ = "0.19"
__status__ = "testing"
__pattern__ = r'^unmatchable$'
+ __config__ = [("activated", "bool", "Activated", True)]
__description__ = """Hoster is no longer available"""
__license__ = "GPLv3"
diff --git a/module/plugins/internal/Extractor.py b/module/plugins/internal/Extractor.py
index 7933a33a6..3ab5d6a0d 100644
--- a/module/plugins/internal/Extractor.py
+++ b/module/plugins/internal/Extractor.py
@@ -21,7 +21,7 @@ class PasswordError(Exception):
class Extractor(Plugin):
- __name = "Extractor"
+ __name__ = "Extractor"
__type__ = "extractor"
__version__ = "0.35"
__status__ = "testing"
@@ -116,8 +116,8 @@ class Extractor(Plugin):
def _log(self, level, plugintype, pluginname, messages):
return self.plugin._log(level,
plugintype,
- self.plugin.__name,
- (self.__name,) + messages)
+ self.plugin.__name__,
+ (self.__name__,) + messages)
def verify(self, password=None):
diff --git a/module/plugins/internal/Hoster.py b/module/plugins/internal/Hoster.py
index 00bc3a4dd..b233f8755 100644
--- a/module/plugins/internal/Hoster.py
+++ b/module/plugins/internal/Hoster.py
@@ -11,13 +11,14 @@ from module.utils import fs_decode, fs_encode, save_join as fs_join, save_path a
class Hoster(Base):
- __name = "Hoster"
+ __name__ = "Hoster"
__type__ = "hoster"
__version__ = "0.37"
__status__ = "testing"
__pattern__ = r'^unmatchable$'
- __config__ = [("use_premium" , "bool", "Use premium account if available" , True),
+ __config__ = [("activated" , "bool", "Activated" , True),
+ ("use_premium" , "bool", "Use premium account if available" , True),
("fallback_premium", "bool", "Fallback to free download if premium fails", True),
("chk_filesize" , "bool", "Check file size" , True)]
@@ -83,7 +84,7 @@ class Hoster(Base):
try:
self.log_debug("PROCESS URL " + self.pyfile.url,
- "PLUGIN VERSION %s" % self.__version) #@TODO: Remove in 0.4.10
+ "PLUGIN VERSION %s" % self.__version__) #@TODO: Remove in 0.4.10
self.process(self.pyfile)
self.check_abort()
diff --git a/module/plugins/internal/MultiCrypter.py b/module/plugins/internal/MultiCrypter.py
index 8930fcb70..900f72589 100644
--- a/module/plugins/internal/MultiCrypter.py
+++ b/module/plugins/internal/MultiCrypter.py
@@ -4,13 +4,14 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter
class MultiCrypter(SimpleCrypter):
- __name = "MultiCrypter"
+ __name__ = "MultiCrypter"
__type__ = "hoster"
__version__ = "0.04"
__status__ = "testing"
__pattern__ = r'^unmatchable$'
- __config__ = [("use_premium" , "bool", "Use premium account if available" , True),
+ __config__ = [("activated" , "bool", "Activated" , True),
+ ("use_premium" , "bool", "Use premium account if available" , True),
("use_subfolder" , "bool", "Save package to subfolder" , True),
("subfolder_per_package", "bool", "Create a subfolder for each package", True)]
@@ -20,7 +21,7 @@ class MultiCrypter(SimpleCrypter):
def init(self):
- self.PLUGIN_NAME = self.pyload.pluginManager.crypterPlugins[self.__name__]['name']
+ self.PLUGIN_NAME = self.pyload.pluginManager.crypterPlugins[self.classname]['name']
def _log(self, level, plugintype, pluginname, messages):
diff --git a/module/plugins/internal/MultiHoster.py b/module/plugins/internal/MultiHoster.py
index 314bc6f92..5655571b8 100644
--- a/module/plugins/internal/MultiHoster.py
+++ b/module/plugins/internal/MultiHoster.py
@@ -7,13 +7,14 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo, r
class MultiHoster(SimpleHoster):
- __name = "MultiHoster"
+ __name__ = "MultiHoster"
__type__ = "hoster"
__version__ = "0.53"
__status__ = "testing"
__pattern__ = r'^unmatchable$'
- __config__ = [("use_premium" , "bool", "Use premium account if available" , True),
+ __config__ = [("activated" , "bool", "Activated" , True),
+ ("use_premium" , "bool", "Use premium account if available" , True),
("fallback_premium", "bool", "Fallback to free download if premium fails", True),
("chk_filesize" , "bool", "Check file size" , True),
("revertfailed" , "bool", "Revert to standard download if fails" , True)]
@@ -30,7 +31,7 @@ class MultiHoster(SimpleHoster):
def init(self):
- self.PLUGIN_NAME = self.pyload.pluginManager.hosterPlugins[self.__name__]['name']
+ self.PLUGIN_NAME = self.pyload.pluginManager.hosterPlugins[self.classname]['name']
def _log(self, level, plugintype, pluginname, messages):
@@ -48,7 +49,7 @@ class MultiHoster(SimpleHoster):
def prepare(self):
#@TODO: Recheck in 0.4.10
- plugin = self.pyload.pluginManager.hosterPlugins[self.__name__]
+ plugin = self.pyload.pluginManager.hosterPlugins[self.classname]
name = plugin['name']
module = plugin['module']
klass = getattr(module, name)
@@ -56,7 +57,7 @@ class MultiHoster(SimpleHoster):
self.get_info = klass.get_info
if self.DIRECT_LINK is None:
- direct_dl = self.__pattern != r'^unmatchable$' and re.match(self.__pattern, self.pyfile.url)
+ direct_dl = self.__pattern__ != r'^unmatchable$' and re.match(self.__pattern__, self.pyfile.url)
else:
direct_dl = self.DIRECT_LINK
@@ -105,8 +106,8 @@ class MultiHoster(SimpleHoster):
self.restart(premium=False)
elif self.get_config("revertfailed", True) and \
- self.pyload.pluginManager.hosterPlugins[self.__name__].get('new_module'):
- hdict = self.pyload.pluginManager.hosterPlugins[self.__name__]
+ self.pyload.pluginManager.hosterPlugins[self.classname].get('new_module'):
+ hdict = self.pyload.pluginManager.hosterPlugins[self.classname]
tmp_module = hdict['new_module']
tmp_name = hdict['new_name']
diff --git a/module/plugins/internal/OCR.py b/module/plugins/internal/OCR.py
index ca87f91a6..ccadbbcbc 100644
--- a/module/plugins/internal/OCR.py
+++ b/module/plugins/internal/OCR.py
@@ -18,7 +18,7 @@ from module.utils import save_join as fs_join
class OCR(Plugin):
- __name = "OCR"
+ __name__ = "OCR"
__type__ = "ocr"
__version__ = "0.20"
__status__ = "testing"
@@ -44,8 +44,8 @@ class OCR(Plugin):
def _log(self, level, plugintype, pluginname, messages):
return self.plugin._log(level,
plugintype,
- self.plugin.__name,
- (self.__name,) + messages)
+ self.plugin.__name__,
+ (self.__name__,) + messages)
def load_image(self, image):
@@ -80,11 +80,11 @@ class OCR(Plugin):
def run_tesser(self, subset=False, digits=True, lowercase=True, uppercase=True, pagesegmode=None):
# tmpTif = tempfile.NamedTemporaryFile(suffix=".tif")
try:
- tmpTif = open(fs_join("tmp", "tmpTif_%s.tif" % self.__name__), "wb")
+ tmpTif = open(fs_join("tmp", "tmpTif_%s.tif" % self.classname), "wb")
tmpTif.close()
# tmpTxt = tempfile.NamedTemporaryFile(suffix=".txt")
- tmpTxt = open(fs_join("tmp", "tmpTxt_%s.txt" % self.__name__), "wb")
+ tmpTxt = open(fs_join("tmp", "tmpTxt_%s.txt" % self.classname), "wb")
tmpTxt.close()
except IOError, e:
@@ -106,7 +106,7 @@ class OCR(Plugin):
if subset and (digits or lowercase or uppercase):
# tmpSub = tempfile.NamedTemporaryFile(suffix=".subset")
- with open(fs_join("tmp", "tmpSub_%s.subset" % self.__name__), "wb") as tmpSub:
+ with open(fs_join("tmp", "tmpSub_%s.subset" % self.classname), "wb") as tmpSub:
tmpSub.write("tessedit_char_whitelist ")
if digits:
diff --git a/module/plugins/internal/Plugin.py b/module/plugins/internal/Plugin.py
index b2d563748..387f499fe 100644
--- a/module/plugins/internal/Plugin.py
+++ b/module/plugins/internal/Plugin.py
@@ -262,7 +262,7 @@ def chunks(iterable, size):
class Plugin(object):
__name__ = "Plugin"
__type__ = "plugin"
- __version__ = "0.55"
+ __version__ = "0.56"
__status__ = "testing"
__pattern__ = r'^unmatchable$'
@@ -272,13 +272,14 @@ class Plugin(object):
__license__ = "GPLv3"
__authors__ = [("Walter Purcaro", "vuolter@gmail.com")]
+
def __init__(self, core):
self._init(core)
self.init()
def __repr__(self):
- return "<%(type)s %(name)s>" % {'type': self.__type.capitalize(),
+ return "<%(type)s %(name)s>" % {'type': self.__type__.capitalize(),
'name': self.classname}
@@ -293,14 +294,6 @@ class Plugin(object):
self.req = None #: Browser instance, see `network.Browser`
self.last_html = None
- #@TODO: Remove in 0.4.10
- for attr in ("name", "type", "version", "status", "pattern",
- "config", "description", "license", "authors"):
- if hasattr(self, "__%s" % attr):
- continue
- value = getattr(self, "__%s__" % attr)
- setattr(self, "__%s" % attr, value)
-
def init(self):
"""
@@ -319,35 +312,35 @@ class Plugin(object):
def log_debug(self, *args, **kwargs):
- self._log("debug", self.__type, self.__name, args)
+ self._log("debug", self.__type__, self.__name__, args)
if self.pyload.debug and kwargs.get('trace'):
print "Traceback (most recent call last):"
traceback.print_stack()
def log_info(self, *args, **kwargs):
- self._log("info", self.__type, self.__name, args)
+ self._log("info", self.__type__, self.__name__, args)
if self.pyload.debug and kwargs.get('trace'):
print "Traceback (most recent call last):"
traceback.print_stack()
def log_warning(self, *args, **kwargs):
- self._log("warning", self.__type, self.__name, args)
+ self._log("warning", self.__type__, self.__name__, args)
if self.pyload.debug and kwargs.get('trace'):
print "Traceback (most recent call last):"
traceback.print_stack()
def log_error(self, *args, **kwargs):
- self._log("error", self.__type, self.__name, args)
+ self._log("error", self.__type__, self.__name__, args)
if self.pyload.debug and kwargs.get('trace', True):
print "Traceback (most recent call last):"
traceback.print_stack()
def log_critical(self, *args, **kwargs):
- self._log("critical", self.__type, self.__name, args)
+ self._log("critical", self.__type__, self.__name__, args)
if kwargs.get('trace', True):
print "Traceback (most recent call last):"
traceback.print_stack()
diff --git a/module/plugins/internal/SevenZip.py b/module/plugins/internal/SevenZip.py
index 5093167ae..f73e935e8 100644
--- a/module/plugins/internal/SevenZip.py
+++ b/module/plugins/internal/SevenZip.py
@@ -9,7 +9,7 @@ from module.utils import save_join as fs_join
class SevenZip(UnRar):
- __name = "SevenZip"
+ __name__ = "SevenZip"
__version__ = "0.16"
__status__ = "testing"
diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py
index b436998ec..98afe8b4c 100644
--- a/module/plugins/internal/SimpleHoster.py
+++ b/module/plugins/internal/SimpleHoster.py
@@ -9,18 +9,19 @@ import time
from module.network.HTTPRequest import BadHeader
from module.network.RequestFactory import getURL as get_url
from module.plugins.internal.Hoster import Hoster, create_getInfo, parse_fileInfo
-from module.plugins.internal.Plugin import Fail, encode, parse_name, parse_time, replace_patterns, seconds_to_midnight, set_cookie, set_cookies
-from module.utils import fixup, fs_encode, parseFileSize as parse_size
+from module.plugins.internal.Plugin import Fail, encode, parse_name, parse_size, parse_time, replace_patterns, seconds_to_midnight, set_cookie, set_cookies
+from module.utils import fixup, fs_encode
class SimpleHoster(Hoster):
- __name = "SimpleHoster"
+ __name__ = "SimpleHoster"
__type__ = "hoster"
__version__ = "1.97"
__status__ = "testing"
__pattern__ = r'^unmatchable$'
- __config__ = [("use_premium" , "bool", "Use premium account if available" , True),
+ __config__ = [("activated" , "bool", "Activated" , True),
+ ("use_premium" , "bool", "Use premium account if available" , True),
("fallback_premium", "bool", "Fallback to free download if premium fails", True),
("chk_filesize" , "bool", "Check file size" , True)]
@@ -223,8 +224,8 @@ class SimpleHoster(Hoster):
self.LINK_PREMIUM_PATTERN = self.LINK_PATTERN
if self.LEECH_HOSTER:
- pattern = self.pyload.pluginManager.hosterPlugins[self.__name__]['pattern']
- if self.__pattern is not pattern and re.match(self.__pattern, self.pyfile.url) is None:
+ pattern = self.pyload.pluginManager.hosterPlugins[self.classname]['pattern']
+ if self.__pattern__ is not pattern and re.match(self.__pattern__, self.pyfile.url) is None:
self.leech_dl = True
if self.leech_dl:
diff --git a/module/plugins/internal/UnRar.py b/module/plugins/internal/UnRar.py
index e625dce11..6f85c286a 100644
--- a/module/plugins/internal/UnRar.py
+++ b/module/plugins/internal/UnRar.py
@@ -21,7 +21,7 @@ def renice(pid, value):
class UnRar(Extractor):
- __name = "UnRar"
+ __name__ = "UnRar"
__version__ = "1.27"
__status__ = "testing"
@@ -56,7 +56,7 @@ class UnRar(Extractor):
p = subprocess.Popen([cls.CMD], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
out, err = p.communicate()
- # cls.__name = "RAR"
+ # cls.__name__ = "RAR"
cls.REPAIR = True
except OSError:
diff --git a/module/plugins/internal/UnZip.py b/module/plugins/internal/UnZip.py
index f71473ba2..87cbd568a 100644
--- a/module/plugins/internal/UnZip.py
+++ b/module/plugins/internal/UnZip.py
@@ -10,7 +10,7 @@ from module.plugins.internal.Extractor import Extractor, ArchiveError, CRCError,
class UnZip(Extractor):
- __name = "UnZip"
+ __name__ = "UnZip"
__version__ = "1.16"
__status__ = "testing"
diff --git a/module/plugins/internal/XFSAccount.py b/module/plugins/internal/XFSAccount.py
index 3b795257f..4c3f35c2b 100644
--- a/module/plugins/internal/XFSAccount.py
+++ b/module/plugins/internal/XFSAccount.py
@@ -11,7 +11,7 @@ from module.plugins.internal.Plugin import parse_html_form, set_cookie
class XFSAccount(Account):
- __name = "XFSAccount"
+ __name__ = "XFSAccount"
__type__ = "account"
__version__ = "0.50"
__status__ = "testing"
diff --git a/module/plugins/internal/XFSCrypter.py b/module/plugins/internal/XFSCrypter.py
index 88a435178..da9c9cff7 100644
--- a/module/plugins/internal/XFSCrypter.py
+++ b/module/plugins/internal/XFSCrypter.py
@@ -5,13 +5,14 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
class XFSCrypter(SimpleCrypter):
- __name = "XFSCrypter"
+ __name__ = "XFSCrypter"
__type__ = "crypter"
__version__ = "0.18"
__status__ = "testing"
__pattern__ = r'^unmatchable$'
- __config__ = [("use_premium" , "bool", "Use premium account if available" , True),
+ __config__ = [("activated" , "bool", "Activated" , True),
+ ("use_premium" , "bool", "Use premium account if available" , True),
("use_subfolder" , "bool", "Save package to subfolder" , True),
("subfolder_per_package", "bool", "Create a subfolder for each package", True)]
@@ -49,7 +50,7 @@ class XFSCrypter(SimpleCrypter):
if self.account:
account = self.account
else:
- account_name = self.__name__.rstrip("Folder")
+ account_name = self.classname.rstrip("Folder")
account = self.pyload.accountManager.getAccountPlugin(account_name)
if account and hasattr(account, "PLUGIN_DOMAIN") and account.PLUGIN_DOMAIN:
diff --git a/module/plugins/internal/XFSHoster.py b/module/plugins/internal/XFSHoster.py
index 0d6a61b33..63b53be41 100644
--- a/module/plugins/internal/XFSHoster.py
+++ b/module/plugins/internal/XFSHoster.py
@@ -11,13 +11,14 @@ from module.utils import html_unescape
class XFSHoster(SimpleHoster):
- __name = "XFSHoster"
+ __name__ = "XFSHoster"
__type__ = "hoster"
__version__ = "0.65"
__status__ = "testing"
__pattern__ = r'^unmatchable$'
- __config__ = [("use_premium" , "bool", "Use premium account if available" , True),
+ __config__ = [("activated" , "bool", "Activated" , True),
+ ("use_premium" , "bool", "Use premium account if available" , True),
("fallback_premium", "bool", "Fallback to free download if premium fails", True),
("chk_filesize" , "bool", "Check file size" , True)]
@@ -80,7 +81,7 @@ class XFSHoster(SimpleHoster):
if self.account:
account = self.account
else:
- account = self.pyload.accountManager.getAccountPlugin(self.__name__)
+ account = self.pyload.accountManager.getAccountPlugin(self.classname)
if account and hasattr(account, "PLUGIN_DOMAIN") and account.PLUGIN_DOMAIN:
self.PLUGIN_DOMAIN = account.PLUGIN_DOMAIN