add `hashString' to torrent-stat's response
This commit is contained in:
parent
0621c67c41
commit
f9e8b56816
|
@ -152,7 +152,9 @@
|
||||||
Request arguments: 3.1's optional "ids" argument.
|
Request arguments: 3.1's optional "ids" argument.
|
||||||
|
|
||||||
Response arguments: "torrent-status", an array of objects
|
Response arguments: "torrent-status", an array of objects
|
||||||
identical to libtransmission's tr_stat struct.
|
based on libtransmission's tr_stat struct but different
|
||||||
|
in the following ways:
|
||||||
|
(1) tr_info's "hashString" field is added.
|
||||||
|
|
||||||
3.5. Adding a Torrent
|
3.5. Adding a Torrent
|
||||||
|
|
||||||
|
|
|
@ -166,7 +166,7 @@ torrentStatus( tr_handle * handle, tr_benc * args_in, tr_benc * args_out )
|
||||||
tr_torrent * tor = torrents[i];
|
tr_torrent * tor = torrents[i];
|
||||||
const tr_stat * st = tr_torrentStat( tor );
|
const tr_stat * st = tr_torrentStat( tor );
|
||||||
const int * f = st->peersFrom;
|
const int * f = st->peersFrom;
|
||||||
tr_benc * d = tr_bencListAddDict( list, 40 );
|
tr_benc * d = tr_bencListAddDict( list, 41 );
|
||||||
tr_benc * t;
|
tr_benc * t;
|
||||||
|
|
||||||
tr_bencDictAddInt( d, "activityDate", st->activityDate );
|
tr_bencDictAddInt( d, "activityDate", st->activityDate );
|
||||||
|
@ -179,6 +179,7 @@ torrentStatus( tr_handle * handle, tr_benc * args_in, tr_benc * args_out )
|
||||||
tr_bencDictAddInt( d, "error", st->error );
|
tr_bencDictAddInt( d, "error", st->error );
|
||||||
tr_bencDictAddStr( d, "errorString", st->errorString );
|
tr_bencDictAddStr( d, "errorString", st->errorString );
|
||||||
tr_bencDictAddInt( d, "eta", st->eta );
|
tr_bencDictAddInt( d, "eta", st->eta );
|
||||||
|
tr_bencDictAddStr( d, "hashString", tor->info.hashString );
|
||||||
tr_bencDictAddInt( d, "haveUnchecked", st->haveUnchecked );
|
tr_bencDictAddInt( d, "haveUnchecked", st->haveUnchecked );
|
||||||
tr_bencDictAddInt( d, "haveValid", st->haveValid );
|
tr_bencDictAddInt( d, "haveValid", st->haveValid );
|
||||||
tr_bencDictAddInt( d, "id", st->id );
|
tr_bencDictAddInt( d, "id", st->id );
|
||||||
|
|
Loading…
Reference in New Issue