Version 9 (modified by mvoncken, 16 years ago) (diff) |
---|
Development/Plugins
We're sorry. not much docs yet.
Plugins consist of a core part and ui parts for the various user-interfaces.
Take a look at the blocklist plugin for an example.
Various random facts
- any "export_*" method in the core plugin is exposed as "plugin-name_*" in deluge.ui.client
- the deluge.ui.client api is available to core plugins as "from deluge.plugins.coreclient import client"
Adding a status-field to core
- define a callback-function http://dev.deluge-torrent.org/browser/trunk/deluge/plugins/label/label/core.py?rev=3607#L356
- register that callback http://dev.deluge-torrent.org/browser/trunk/deluge/plugins/label/label/core.py?rev=3607#L74
- now the field is available in ui.client..get_torrent_status
Adding a column to gtk-ui
- callback for cell : http://dev.deluge-torrent.org/browser/trunk/deluge/plugins/label/label/gtkui/__init__.py#L51
- register that callback : http://dev.deluge-torrent.org/browser/trunk/deluge/plugins/label/label/gtkui/__init__.py#L115
subscribing to alerts
- subscribing to the torrent_finished alert : http://forum.deluge-torrent.org/viewtopic.php?f=9&t=8155#p37775