Page 3 of 5
Re: Android, Remote Only Client
Posted: Tue May 19, 2009 11:59 am
by ElmoTheElk
Hi Damoxc,
Here is the first version that supports Deluge. Can you take a look at it and see if it works for you? Your 1.2 Deluge web ui should be running and connected(!). Download at
http://ekok.nl/download/transdroid-0.7.0.apk (The outside version number is the same, but it will override any possible previous installs nicely.)
Everything should work, so let me know if it doesn't. Thanks!
Eric
Re: Android, Remote Only Client
Posted: Wed May 20, 2009 9:12 pm
by damoxc
Yup works great!
Just a couple of suggestions:
- Allow the pop up message saying the list has been refreshed to be switched off
- Allow for a faster refresh time than 5 seconds, perhaps an "Other"
Good work though

Re: Android, Remote Only Client
Posted: Thu May 21, 2009 11:42 am
by ElmoTheElk
Good suggestions. I'll add them to the next release.
You might get some questions from people asking about when 1.2 will be released. I published Transdroid with Deluge 1.2 support to the market for early adapters.

Re: Android, Remote Only Client
Posted: Wed Jun 17, 2009 9:28 pm
by ElmoTheElk
Hi agina,
How is the progress on Deluge 1.2? In the meantime, the Deluge-supporting Andorid client is on the market for some time now. Not sure about how many actually use the Deluge daemon with it though, but I guess you do.
I am trying to implement the 'uploading' of .torrent files to the Deluge daemon now using the JSON API. The
method list mentions an
add_torrent_file_binary method. But is this also available when using the Web UI JSON API? Since sending raw bytes as JSON-encoded strings seems troublesome...
I have to admit I haven't tried it yet, but will this actually work? Thanks!
Re: Android, Remote Only Client
Posted: Thu Jun 18, 2009 8:24 am
by damoxc
Nope, you need to upload the file to the webserver (via a HTTP post to /upload, and the contents of the resulting page is the filename on the server of the file you just uploaded), and then call web.add_torrents via json.
Code: Select all
@export
def add_torrents(self, torrents):
"""
Add torrents by file
:param torrents: A list of dictionaries containing the torrent
path and torrent options to add with.
:type torrents: list
**Usage**
>>> json_api.add_torrents([{
"path": "/tmp/deluge-web/some-torrent-file.torrent",
"options": {"download_path": "/home/deluge/"}
}])
"""
Re: Android, Remote Only Client
Posted: Thu Jun 18, 2009 1:00 pm
by ElmoTheElk
Thanks... again! I have it working now and it will be in the next release.
Re: Android, Remote Only Client
Posted: Tue Aug 11, 2009 3:38 pm
by damoxc
I'm going to be making it so you
must be authenticated before making a json request which I believe will break your client? Thought I'd just let you know

Re: Android, Remote Only Client
Posted: Wed Aug 12, 2009 7:38 am
by damoxc
Righty, this has been implemented now, you need to call "client.web.login" which if successful will add a set-cookie header to the response containing _session_id and return True.
You'll have to include this cookie in further requests otherwise you'll receive not authenticated errors.
Re: Android, Remote Only Client
Posted: Mon Aug 17, 2009 12:22 pm
by ElmoTheElk
Thanks for letting me know! I will update my client soon.
Re: Android, Remote Only Client
Posted: Tue Sep 01, 2009 1:17 pm
by ElmoTheElk
Hey damoxc,
I have taken a look at this, but confused about what to do. I used to use the auth.login method, which worked fine. I send the password with this request.
Now, I have checked out the latest version of Deluge from the trunk, and this (old?) method now gives:
Code: Select all
{"id": 1, "result": true, "error": null}
However, I do not get authenticated, which I guess is by design:
Code: Select all
{"id": 2, "result": null, "error": {"message": "Not authenticated", "code": 1}}
So I tried calling client.web.login and also web.login but both give a response:
Code: Select all
{"id": 2, "result": null, "error": {"message": "Unknown method", "code": 2}}
Any ideas? deluged won't give me any error messages, even when started with 'deluged -L debug -d'.
Thanks!