lalbornoz
2020-03-23T16:36:19Z

Add torrents to Deluge via Web API (requires patched deluge-web and ViolentMonkey)

Add torrents to Deluge via Web API (requires patched deluge-web[1][2][3] owing to missing functionality & unfixed bugs and ViolentMonkey due to 3rd-party cookies)

Eligible BitTorrent and/or Magnet links will have a clickable progress bar appended to them and may be queued on-click; refer to their tooltips for a detailed progress update.

This script requires in-script configuration prior to usage. Consult the following table and set, at minimum, delugeDownloadDir, delugeHostId, delugeTorrentDirectory, delugeWebPassword, and delugeWebUrl.

Variable name | Default value | Description
debug | false | Print debugging messages to Web console
delugeDownloadDir | "": "/var/lib/deluge/downloads" | Ordered dictionary of hostname and domain name keys mapping to download directory pathnames
delugeHostId | | Deluge host identifier (see <deluge directory>/.config/deluge/hostlist.conf)
delugeHttpAuthPassword | | HTTP basic access authentication password (optional)
delugeHttpAuthUsername | | HTTP basic access authentication username (optional)
delugeTorrentDirectory | /var/lib/deluge/torrents | Torrent directory pathname
delugeWebPassword | | Deluge host web password
delugeWebUrl | protocol://hostname[:port]/deluge | URL to deluge-web

References

Wed, 25 Mar 2020 11:00:50 +0100 [1] deluge-2.0.3+AddTorrentsDeluge.patch

Mon, 30 Mar 2020 14:02:23 +0200 [2] #3366 (WebApi.add_torrents(): deferred RPC failure results are not propagated) – Deluge

Mon, 30 Mar 2020 14:02:30 +0200 [3] #3367 (WebApi.add_torrents(): implement in-stream BitTorrent file uploading support) – Deluge