summaryrefslogtreecommitdiffstats
path: root/docs/write_addons.rst
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2015-02-16 22:38:45 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2015-02-16 22:38:45 +0100
commit270c1ee85edcd1e9e10511833b422d93dfca192a (patch)
treeeb846081ba3ec09721879ee237016b26d19c3c2f /docs/write_addons.rst
parentFix plugins to work on 0.4.10 (diff)
downloadpyload-270c1ee85edcd1e9e10511833b422d93dfca192a.tar.xz
Diffstat (limited to 'docs/write_addons.rst')
-rw-r--r--docs/write_addons.rst12
1 files changed, 6 insertions, 6 deletions
diff --git a/docs/write_addons.rst b/docs/write_addons.rst
index 7607560ff..9f4436cc5 100644
--- a/docs/write_addons.rst
+++ b/docs/write_addons.rst
@@ -19,20 +19,20 @@ All addons should start with something like this: ::
from pyload.plugin.Addon import Addon
class YourAddon(Addon):
- __name__ = "YourAddon"
- __version__ = "0.1"
- __description__ = "Does really cool stuff"
- __config__ = [ ("activated" , "bool" , "Activated" , "True" ) ]
+ __name = "YourAddon"
+ __version = "0.1"
+ __description = "Does really cool stuff"
+ __config = [ ("activated" , "bool" , "Activated" , "True" ) ]
__author_name__ = ("Me")
__author_mail__ = ("me@has-no-mail.com")
-All meta-data is defined in the header, you need at least one option at ``__config__`` so the user can toggle your
+All meta-data is defined in the header, you need at least one option at ``__config`` so the user can toggle your
addon on and off. Dont't overwrite the ``init`` method if not neccesary, use ``setup`` instead.
Using the Config
----------------
-We are taking a closer look at the ``__config__`` parameter.
+We are taking a closer look at the ``__config`` parameter.
You can add more config values as desired by adding tuples of the following format to the config list: ``("name", "type", "description", "default value")``.
When everything went right you can access the config values with ``self.getConfig(name)`` and ``self.setConfig(name, value``.