Changeset 6029


Ignore:
Timestamp:
Jun 4, 2008, 7:06:47 AM (14 years ago)
Author:
charles
Message:

modify the torrent-list response as per Gimp_'s request

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/rpc-spec.txt

    r5912 r6029  
    8484   Request arguments: none.
    8585
    86    Response arguments: "list", an array of objects that contain seven keys:
    87 
    88    key                 | value type
    89    --------------------+-------------------------------------------------
    90    "hashString"        | string
    91    "id"                | number
    92    "name"              | string
    93    "rateDownload"      | double
    94    "rateUpload"        | double
    95    "ratio"             | double
     86   Response arguments: "list", an array of objects that contain these keys:
     87
     88   key                   | value type
     89   ----------------------+-------------------------------------------------
     90   "downloadedEver"      | number
     91   "eta"                 | number
     92   "hashString"          | string
     93   "id"                  | number
     94   "name"                | string
     95   "peersConnected"      | number
     96   "peersSendingToUs"    | number
     97   "peersGettingFromUs"  | number
     98   "percentDone"         | double
     99   "rateDownload"        | double
     100   "rateUpload"          | double
     101   "ratio"               | double
     102   "sizeWhenDone"        | number
     103   "status"              | number
     104   "uploadedEver"        | number
     105
     106
    96107
    971083.3.  Torrent Info Requests
  • trunk/libtransmission/rpc.c

    r5959 r6029  
    297297    tr_benc * list = tr_bencDictAddList( args_out, "list", torrentCount );
    298298
    299     for( i=0; i<torrentCount; ++i ) {
     299    for( i=0; i<torrentCount; ++i )
     300    {
    300301        tr_torrent * tor = torrents[i];
    301302        const tr_stat * st = tr_torrentStat( tor );
    302         tr_benc * d = tr_bencListAddDict( list, 7 );
     303        tr_benc * d = tr_bencListAddDict( list, 15 );
     304        tr_bencDictAddInt( d, "downloadedEver", st->downloadedEver );
     305        tr_bencDictAddInt( d, "eta", st->eta );
    303306        tr_bencDictAddStr( d, "hashString", tor->info.hashString );
    304307        tr_bencDictAddInt( d, "id", tr_torrentId( tor ) );
    305308        tr_bencDictAddStr( d, "name", tor->info.name );
     309        tr_bencDictAddInt( d, "peersConnected", st->peersConnected );
     310        tr_bencDictAddInt( d, "peersGettingFromUs", st->peersGettingFromUs );
     311        tr_bencDictAddInt( d, "peersSendingToUs", st->peersSendingToUs );
     312        tr_bencDictAddDouble( d, "percentDone", st->percentDone );
    306313        tr_bencDictAddDouble( d, "rateDownload", st->rateDownload );
    307314        tr_bencDictAddDouble( d, "rateUpload", st->rateUpload );
    308315        tr_bencDictAddDouble( d, "ratio", st->ratio );
     316        tr_bencDictAddInt( d, "sizeWhenDone", st->sizeWhenDone );
    309317        tr_bencDictAddInt( d, "status", st->status );
     318        tr_bencDictAddInt( d, "uploadedEver", st->uploadedEver );
    310319    }
    311320
Note: See TracChangeset for help on using the changeset viewer.