diff options
Diffstat (limited to 'pyload/plugins')
-rw-r--r-- | pyload/plugins/Account.py | 6 | ||||
-rw-r--r-- | pyload/plugins/Base.py | 14 | ||||
-rw-r--r-- | pyload/plugins/hoster/BasePlugin.py | 4 |
3 files changed, 15 insertions, 9 deletions
diff --git a/pyload/plugins/Account.py b/pyload/plugins/Account.py index 2a85e2b44..0bf201c1a 100644 --- a/pyload/plugins/Account.py +++ b/pyload/plugins/Account.py @@ -4,7 +4,7 @@ from time import time from traceback import print_exc from threading import RLock -from pyload.utils import compare_time, format_size, parseFileSize, lock, from_string +from pyload.utils import compare_time, format_size, parseFileSize, lock, to_bool from pyload.Api import AccountInfo from pyload.network.CookieJar import CookieJar @@ -50,7 +50,7 @@ class Account(Base): Base.__init__(self, manager.core) if "activated" in options: - self.activated = from_string(options["activated"], "bool") + self.activated = to_bool(options["activated"]) else: self.activated = Account.activated @@ -141,7 +141,7 @@ class Account(Base): self.valid = True #set valid, so the login will be retried if "activated" in options: - self.activated = from_string(options["avtivated"], "bool") + self.activated = True if options["activated"] == "True" else False if password: self.password = password diff --git a/pyload/plugins/Base.py b/pyload/plugins/Base.py index 47369e21f..308a38726 100644 --- a/pyload/plugins/Base.py +++ b/pyload/plugins/Base.py @@ -50,12 +50,12 @@ class Base(object): #: When True this addon can be enabled by every user __user_context__ = False #: Config definition: list of (name, type, label, default_value) or - #: (name, type, label, short_description, default_value) - __config__ = list() + #: (name, label, desc, Input(...)) + __config__ = tuple() #: Short description, one liner - __label__ = "" + __description__ = "" #: More detailed text - __description__ = """""" + __explanation__ = """""" #: List of needed modules __dependencies__ = tuple() #: Used to assign a category for addon plugins @@ -66,6 +66,8 @@ class Base(object): __icon__ = "" #: Alternative, link to png icon __icon_url__ = "" + #: Domain name of the service + __domain__ = "" #: Url with general information/support/discussion __url__ = "" #: Url to term of content, user is accepting these when using the plugin @@ -106,6 +108,10 @@ class Base(object): #: last interaction task self.task = None + def __getitem__(self, item): + """ Retrieves meta data attribute """ + return getattr(Base, "__%s__" % item) + def logInfo(self, *args, **kwargs): """ Print args to log at specific level diff --git a/pyload/plugins/hoster/BasePlugin.py b/pyload/plugins/hoster/BasePlugin.py index 7070fafde..552e7bc73 100644 --- a/pyload/plugins/hoster/BasePlugin.py +++ b/pyload/plugins/hoster/BasePlugin.py @@ -13,7 +13,7 @@ class BasePlugin(Hoster): __type__ = "hoster" __pattern__ = r"^unmatchable$" __version__ = "0.17" - __description__ = """Base Plugin when any other didnt fit""" + __description__ = """Base Plugin when any other didn't match""" __author_name__ = ("RaNaN") __author_mail__ = ("RaNaN@pyload.org") @@ -31,7 +31,7 @@ class BasePlugin(Hoster): #TODO: remove debug if pyfile.url.lower().startswith("debug"): - self.decryptCaptcha("http://download.pyload.org/pie.png", imgtype="png") + self.decryptCaptcha("http://forum.pyload.org/lib/tpl/pyload/images/pyload-logo-edited3.5-new-font-small.png", imgtype="png") self.download("http://download.pyload.org/random100.bin") return # |