(rpc) allocate a bit in torrent-set/torrent-get for detailed peer information
This commit is contained in:
parent
af626c9e0b
commit
2bd8dbf33a
|
@ -170,12 +170,14 @@
|
|||
| number | uploadLimit | tr_torrent
|
||||
| number | uploadLimitMode | tr_torrent
|
||||
-------------------+----------+------------------------+-------------
|
||||
peers, 256 | number | fromCache | tr_stat
|
||||
peers, 256 | not defined yet
|
||||
-------------------+----------+------------------------+-------------
|
||||
peer stats, 512 | number | fromCache | tr_stat
|
||||
| number | fromIncoming | tr_stat
|
||||
| number | fromPex | tr_stat
|
||||
| number | fromTracker | tr_stat
|
||||
-------------------+----------+------------------------+-------------
|
||||
priorities, 512 | array | priorities | tr_info
|
||||
priorities, 1024 | array | priorities | tr_info
|
||||
| array | wanted | tr_info
|
||||
+----------+--------------------------------------
|
||||
| priorities is an array of tr_info.fileCount
|
||||
|
@ -186,23 +188,23 @@
|
|||
| 'booleans' true if the corresponding file
|
||||
| is to be downloaded.
|
||||
-------------------+----------+------------------------+-------------
|
||||
scrape, 1024 | number | lastScrapeTime | tr_stat
|
||||
scrape, 2048 | number | lastScrapeTime | tr_stat
|
||||
| number | nextScrapeTime | tr_stat
|
||||
| string | scrapeResponse | tr_stat
|
||||
| string | scrapeURL | tr_stat
|
||||
-------------------+----------+------------------------+-------------
|
||||
size, 2048 | number | haveUnchecked | tr_stat
|
||||
size, 4096 | number | haveUnchecked | tr_stat
|
||||
| number | haveValid | tr_stat
|
||||
| number | leftUntilDone | tr_stat
|
||||
| number | sizeWhenDone | tr_stat
|
||||
| number | totalSize | tr_info
|
||||
-------------------+----------+------------------------+-------------
|
||||
tracker stats, | number | leechers | tr_stat
|
||||
4096 | number | peersKnown | tr_stat
|
||||
8192 | number | peersKnown | tr_stat
|
||||
| number | seeders | tr_stat
|
||||
| number | timesCompleted | tr_stat
|
||||
-------------------+----------+--------------------------------------
|
||||
trackers, 8192 | array | trackers
|
||||
trackers, 16384 | array | trackers
|
||||
+----------+--------------------------------------
|
||||
| trackers is an array of objects that contain:
|
||||
+----------+------------------------+-------------
|
||||
|
@ -210,7 +212,7 @@
|
|||
| string | scrape | tr_info
|
||||
| number | tier | tr_info
|
||||
-------------------+----------+------------------------+-------------
|
||||
webseeds, 16384 | array | webseeds
|
||||
webseeds, 32768 | array | webseeds
|
||||
+----------+--------------------------------------
|
||||
| webseeds is an array of strings:
|
||||
+----------+------------------------+-------------
|
||||
|
|
|
@ -262,7 +262,7 @@ addInfo( const tr_torrent * tor, tr_benc * d, uint64_t fields )
|
|||
tr_bencDictAddInt( d, "uploadLimitMode", tr_torrentGetSpeedMode( tor, TR_UP ) );
|
||||
}
|
||||
|
||||
if( fields & TR_RPC_TORRENT_PEERS ) {
|
||||
if( fields & TR_RPC_TORRENT_PEER_STATS ) {
|
||||
const int * f = st->peersFrom;
|
||||
tr_bencDictAddInt( d, "fromCache", f[TR_PEER_FROM_CACHE] );
|
||||
tr_bencDictAddInt( d, "fromIncoming", f[TR_PEER_FROM_INCOMING] );
|
||||
|
|
|
@ -28,12 +28,13 @@ enum
|
|||
TR_RPC_TORRENT_INFO = (1<<6),
|
||||
TR_RPC_TORRENT_LIMITS = (1<<7),
|
||||
TR_RPC_TORRENT_PEERS = (1<<8),
|
||||
TR_RPC_TORRENT_PRIORITIES = (1<<9),
|
||||
TR_RPC_TORRENT_SCRAPE = (1<<10),
|
||||
TR_RPC_TORRENT_SIZE = (1<<11),
|
||||
TR_RPC_TORRENT_TRACKER_STATS = (1<<12),
|
||||
TR_RPC_TORRENT_TRACKERS = (1<<13),
|
||||
TR_RPC_TORRENT_WEBSEEDS = (1<<14)
|
||||
TR_RPC_TORRENT_PEER_STATS = (1<<9),
|
||||
TR_RPC_TORRENT_PRIORITIES = (1<<10),
|
||||
TR_RPC_TORRENT_SCRAPE = (1<<11),
|
||||
TR_RPC_TORRENT_SIZE = (1<<12),
|
||||
TR_RPC_TORRENT_TRACKER_STATS = (1<<13),
|
||||
TR_RPC_TORRENT_TRACKERS = (1<<14),
|
||||
TR_RPC_TORRENT_WEBSEEDS = (1<<15)
|
||||
};
|
||||
|
||||
struct tr_benc;
|
||||
|
|
|
@ -30,12 +30,13 @@ RPC._TorrentId = (1<<5);
|
|||
RPC._TorrentInfo = (1<<6);
|
||||
RPC._TorrentLimits = (1<<7);
|
||||
RPC._TorrentPeers = (1<<8);
|
||||
RPC._TorrentPriorities = (1<<9);
|
||||
RPC._TorrentScrape = (1<<10);
|
||||
RPC._TorrentSize = (1<<11);
|
||||
RPC._TorrentTrackerStats = (1<<12);
|
||||
RPC._TorrentTrackers = (1<<13);
|
||||
RPC._TorrentWebseeds = (1<<14);
|
||||
RPC._TorrentPeerStats = (1<<9);
|
||||
RPC._TorrentPriorities = (1<<10);
|
||||
RPC._TorrentScrape = (1<<11);
|
||||
RPC._TorrentSize = (1<<12);
|
||||
RPC._TorrentTrackerStats = (1<<13);
|
||||
RPC._TorrentTrackers = (1<<14);
|
||||
RPC._TorrentWebseeds = (1<<15);
|
||||
|
||||
function TransmissionRemote( controller )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue