How to refer to a torrent by its hash in the RPC interface?

Discussion of Transmission that doesn't fit in the other categories
Post Reply
ingwar
Posts: 2
Joined: Mon Jan 19, 2009 3:42 pm

How to refer to a torrent by its hash in the RPC interface?

Post by ingwar »

Hi guys,

Transmission is a very good BT client but I need help for correct transmission-daemon managing.
The question is how could I manage remotly only a one download except to specify the number as id for this transfer?
E.g. in my tries I could remove a separate torrent only through the following request:
{"arguments":{"id":13},"method":"torrent-remove"}
But I'd like to do it smg like this:
{"arguments":{"id":"6b28e001d7a0dee92a04625d52d9a2f7568a4de9"},"method":"torrent-remove"}
or
{"arguments":{"hashString":"6b28e001d7a0dee92a04625d52d9a2f7568a4de9"},"method":"torrent-remove"}
or
{"arguments":{"name":"swt.jar"},"method":"torrent-remove"}

None of these methods works properly. I.e. with this aproach all files in the list are removed!

Thanks in advance,
blueluna
Posts: 2
Joined: Mon Jan 19, 2009 4:56 pm

Re: Correct using of hash for file manage in the transm.-daemon

Post by blueluna »

I was quite certain that i do this so I just ran a test. I could remove a torrent using the hashString using this request.

Code: Select all

{"tag": 4, "method": "torrent-remove", "arguments": {"delete-local-data": 0, "ids": ["caff87b88f50f46bc22da3a2712a6a4e9a98d91e"]}}
I got the response.

Code: Select all

{
    "arguments": {}, 
    "result": "success", 
    "tag": 4
}
I ran this test with Transmission 1.5x but i have used similar request since Transmission 1.3.

For reference see the RPC specification. http://trac.transmissionbt.com/wiki/rpc.
ingwar
Posts: 2
Joined: Mon Jan 19, 2009 3:42 pm

Re: Correct using of hash for file manage in the transm.-daemon

Post by ingwar »

Thank you very much, it works! :)
Post Reply