latop2604/UTorrentClientApi

torrent label

Closed this issue · 1 comments

Is there a way to post the torrent to uTorrent but to a specific label?

I found this solution that works

class MyRequest : Request {
protected override bool CheckAction(UrlAction action) {
return true;
}
}

var client = new UTorrentClient(IPAddress.Loopback, 80, "user", "password");
var torrent = client.AddUrlTorrent("your magent link").AddedTorrent;
var request = new MyRequest();
request.SetAction(UrlAction.Create("SETPROPS"));
request.SetTorrentHash(torrent.Hash);
request.SetSetting("label", "your label");
client.ProcessRequest(request);