I've been trying all day to fix the webui into accepting input from the userscript now that the function add_torrent_filecontent has been removed or has magically dissapeared somewhere. The fix takes less than a minute. Here's what you need to edit:
(take note, on my ubuntu box the webui files are under/usr/share/python-support/deluge-webui/deluge/ui/webui)
The original code in the file pages.py you need to find is:
Code: Select all
if vars.data_b64: #b64 post (greasemonkey)
data_b64 = unicode(vars.data_b64)
torrent_name = vars.torrent_name
else: #file-post (curl)
data_b64 = base64.b64encode(vars.torrent.file.read())
torrent_name = vars.torrent.filename
proxy.add_torrent_filecontent(torrent_name, data_b64)
return 'ok'
Code: Select all
if vars.data_b64: #b64 post (greasemonkey)
data_b64 = base64.decodestring(unicode(vars.data_b64))
torrent_name = vars.torrent_name
else: #file-post (curl)
log.debug('testing')
data_b64 = base64.b64encode(vars.torrent.file.read())
torrent_name = vars.torrent.filename
proxy.add_torrent_file_binary(torrent_name, data_b64)
Have fun with those torrents
