Page 1 of 1
Adding Torrents via Firefox and WebUI?
Posted: Sat Sep 06, 2008 12:24 pm
by ottk3
Hi there,
is it possible to add Torrent via Firefox and the WebUI automatically?
Because i have a Windows PC (using Firefox) and want to add .torrent files just
by clicking on the link (like save as). Is that possible?
Thanks for your help
ottk3
Re: Adding Torrents via Firefox and WebUI?
Posted: Sat Sep 06, 2008 3:37 pm
by loki
I don't know about the web ui part but you should be able to set it to open with deluge instead of save as, point it to "deluge.cmd" in the main install directory.
Re: Adding Torrents via Firefox and WebUI?
Posted: Sat Sep 06, 2008 3:59 pm
by johnnyg
there used to be a greasemonkey script that did this:
http://userscripts.org/scripts/show/12639
but it hasn't been ported to deluge 1.0 yet...
Re: Adding Torrents via Firefox and WebUI?
Posted: Sat Sep 06, 2008 4:29 pm
by ottk3
@loki
Deluge is running on a linux computer with the WebUI Plugin, so the Windows PC should be able to send/add his torrents, without pasting them manually in the GUI.
@johnnyg
That's all i found, but it doesn't work with the current version of Deluge nor do i want to install greasemonkey on the Windows PC.
I thought there is maybe a way to send it to "http://host:port/remote/torrent/add" via a small commandline script or something, like it's possible on linux via "curl". Any ideas?
Re: Adding Torrents via Firefox and WebUI?
Posted: Sat Sep 06, 2008 5:45 pm
by johnnyg
I think the url would look like http://host:port/torrent/add?id_url=torrent_url in its simplest form.
however I would assume you would need to have someway of passing along the login info as well.
as for a batch file to do it: unlike linux, windows cmd isn't that powerful; I'm not sure you could do it without resorting to another scripting language (like python) or writing an actual application which seems like alot more hassle than installing greasemonkey.
Re: Adding Torrents via Firefox and WebUI?
Posted: Sat Sep 06, 2008 6:04 pm
by ottk3
i'll test a little bit, cURL ist also available for Windows, but i'm not sure how Firefox transfers URLs if i use "open with"?
then it should be possible to make a batch like this:
Code: Select all
set path=URL
curl.exe -F torrent=@./%path% -F pwd=deluge http://host:port/remote/torrent/add
Re: Adding Torrents via Firefox and WebUI?
Posted: Sat Sep 06, 2008 11:33 pm
by mvoncken
Just tested it on my machine and the script still works for me with the default settings, to lazy to test anything else right now.
Explain what went wrong.
I'm on vacation , so dont expect any fast reply's or fixes.
Re: Adding Torrents via Firefox and WebUI?
Posted: Sun Sep 07, 2008 2:03 am
by johnnyg
ottk3 wrote:i'll test a little bit, cURL ist also available for Windows, but i'm not sure how Firefox transfers URLs if i use "open with"?
then it should be possible to make a batch like this:
Code: Select all
set path=URL
curl.exe -F torrent=@./%path% -F pwd=deluge http://host:port/remote/torrent/add
if your batch file was called webui-downloader.bat say then firefox would run "webui-downloader.bat" "%1" where %1 would be the url of the torrent.
mvoncken wrote:
Just tested it on my machine and the script still works for me with the default settings, to lazy to test anything else right now.
Explain what went wrong.
I'm on vacation , so dont expect any fast reply's or fixes.
I hadn't actually tried it, I just assumed that it wouldn't work seeing it was last modified in september '07

Re: Adding Torrents via Firefox and WebUI?
Posted: Mon Sep 08, 2008 7:51 am
by ottk3
I doesn't work with URL, i'm not sure what's wrong, but the script only works with local stored *.torrent files.
I'm not sure what option cURL needs, to use URL Torrents...?
Code: Select all
curl.exe -F torrent=http://domain.tld/foobar.torrent -F pwd=deluge http://host:port/remote/torrent/add
Re: Adding Torrents via Firefox and WebUI?
Posted: Wed Sep 10, 2008 11:11 pm
by mvoncken
ottk3 wrote:I doesn't work with URL, i'm not sure what's wrong, but the script only works with local stored *.torrent files.
I'm not sure what option cURL needs, to use URL Torrents...?
Code: Select all
curl.exe -F torrent=http://domain.tld/foobar.torrent -F pwd=deluge http://host:port/remote/torrent/add
1 * for firefox use the greasemonkey plugin.
2 * command-line adding from url
2.a get the torrent using wget, and post it using curl.
2.b or link to : /torrent/add?redir_after_login=1&url=URL-ESCAPED-TORRENT-URL