Hi Atif,
I wonder if you can help me again ... I have got pretty far with my
plugin and most is working well, now I am trying to get the stop/start/
remove methods written but I am running into difficulty in defining
which exact file to perform the action on. According to the RPC spec:
3.1. Torrent Action Requests
Method name | libtransmission function
---------------------
+-------------------------------------------------
"torrent-start" | tr_torrentStart
"torrent-start-now" | tr_torrentStartNow
"torrent-stop" | tr_torrentStop
"torrent-verify" | tr_torrentVerify
"torrent-reannounce" | tr_torrentManualUpdate ("ask tracker for more
peers")
Request arguments: "ids", which specifies which torrents to use. All
torrents are used if the "ids" argument is omitted. "ids" should be
one of the following:
(1) an integer referring to a torrent id
(2) a list of torrent id numbers, sha1 hash strings, or both
(3) a string, "recently-active", for recently-active torrents
Response arguments: none
I have a list of my "ids" in an array of "int" and I am using a method
to invoke the client:
public static void startTorrent(int startID)
{
var url = new Uri("http://" + LocalSettings.Hostname + ":"
+ LocalSettings.Port + "/transmission/rpc");
var client = new TransmissionClient(url);
client.Invoke("torrent-start", new { fields = new[]
{ startID } }, null);
}
I am calling the method using the selected torrent in the list like
this:
int selected = variables.torrentID[variables.selTorrent];
startTorrent(selected);
Now the issue is that ALL the torrrents start when doing this, not the
one selected, according to the spec above this means that no "ids"
were sent. What am I doing wrong here?
Thanks.
> ...
>
> read more »