Version 2 (modified by konti, 14 years ago) (diff)

--

Execute

The Execute plugin is only supported from deluge versions 1.3RC2 and up. It gives you the option to run your own scripts (e.a. Bash, Python or any other shell) triggered with different events in Deluge. At this moment only the events added (when a torrent is added to deluge) and complete (when a torrent has finished downloading) are supported. More events whill be added in the future.

The script will be executed with three variables.

1: The id of the torrent 2: The name of the torrent 3: With the added event the Download to: folder and with the complete event the - when configured - Move completed to: folder.

Configuration

Through webUI

As of version 1.3RC2 it is possible to configure the plugin through webUI without manually having to install the plugin. It is necessary to enable the plugin in the plugins menu in Preferences. After reopening the Preferences menu the Execute plugin is available.

The events Torrent Complete and Torrent Added can be selected. The command should be the full path script (e.a. /var/lib/deluge/myscripts/on_added.sh). Make sure the script is accessible by the user that is used to run deluged and that it is executable.

Through GTK UI

Script Examples

bash

python

The following scripts can be used for testing purposses. They can be run from command line like:

./test.py "var1" "var2" "var3"

The variables should show up in your syslog.

tail /var/log/syslog

Python Example script

#!/usr/bin/python
import sys
import os
import syslog
syslog.syslog('deluge test: the script started running')
for arg in sys.argv[1:]:
    syslog.syslog(arg)