diff --git a/doc/rpc-spec.txt b/doc/rpc-spec.txt index e2a3fb2ce..b6deed932 100644 --- a/doc/rpc-spec.txt +++ b/doc/rpc-spec.txt @@ -83,16 +83,27 @@ Request arguments: none. - Response arguments: "list", an array of objects that contain seven keys: + Response arguments: "list", an array of objects that contain these keys: + + key | value type + ----------------------+------------------------------------------------- + "downloadedEver" | number + "eta" | number + "hashString" | string + "id" | number + "name" | string + "peersConnected" | number + "peersSendingToUs" | number + "peersGettingFromUs" | number + "percentDone" | double + "rateDownload" | double + "rateUpload" | double + "ratio" | double + "sizeWhenDone" | number + "status" | number + "uploadedEver" | number + - key | value type - --------------------+------------------------------------------------- - "hashString" | string - "id" | number - "name" | string - "rateDownload" | double - "rateUpload" | double - "ratio" | double 3.3. Torrent Info Requests diff --git a/libtransmission/rpc.c b/libtransmission/rpc.c index 4c283c0a5..04eed02d3 100644 --- a/libtransmission/rpc.c +++ b/libtransmission/rpc.c @@ -296,17 +296,26 @@ torrentList( tr_handle * handle, tr_benc * args_in, tr_benc * args_out ) tr_torrent ** torrents = getTorrents( handle, args_in, &torrentCount ); tr_benc * list = tr_bencDictAddList( args_out, "list", torrentCount ); - for( i=0; idownloadedEver ); + tr_bencDictAddInt( d, "eta", st->eta ); tr_bencDictAddStr( d, "hashString", tor->info.hashString ); tr_bencDictAddInt( d, "id", tr_torrentId( tor ) ); tr_bencDictAddStr( d, "name", tor->info.name ); + tr_bencDictAddInt( d, "peersConnected", st->peersConnected ); + tr_bencDictAddInt( d, "peersGettingFromUs", st->peersGettingFromUs ); + tr_bencDictAddInt( d, "peersSendingToUs", st->peersSendingToUs ); + tr_bencDictAddDouble( d, "percentDone", st->percentDone ); tr_bencDictAddDouble( d, "rateDownload", st->rateDownload ); tr_bencDictAddDouble( d, "rateUpload", st->rateUpload ); tr_bencDictAddDouble( d, "ratio", st->ratio ); + tr_bencDictAddInt( d, "sizeWhenDone", st->sizeWhenDone ); tr_bencDictAddInt( d, "status", st->status ); + tr_bencDictAddInt( d, "uploadedEver", st->uploadedEver ); } tr_free( torrents );