1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-22 07:42:37 +00:00

(libT) #5220 'add etaIdle to torrent-get in RPC' -- done.

This commit is contained in:
Jordan Lee 2013-01-13 20:39:56 +00:00
parent 2d746af8ad
commit 03da3e0a60
4 changed files with 11 additions and 1 deletions

View file

@ -163,6 +163,7 @@
error | number | tr_stat
errorString | string | tr_stat
eta | number | tr_stat
etaIdle | number | tr_stat
files | array (see below) | n/a
fileStats | array (see below) | n/a
hashString | string | tr_info
@ -715,3 +716,6 @@
| | yes | | new method "queue-move-down"
| | yes | | new method "queue-move-bottom"
| | yes | | new method "torrent-start-now"
------+---------+-----------+----------------+-------------------------------
15 | 2.80 | yes | torrent-get | new arg "etaIdle"

View file

@ -100,6 +100,7 @@ static const struct tr_key_struct my_static[] =
{ "error", 5 },
{ "errorString", 11 },
{ "eta", 3 },
{ "etaIdle", 7 },
{ "failure reason", 14 },
{ "fields", 6 },
{ "fileStats", 9 },

View file

@ -110,6 +110,7 @@ enum
TR_KEY_error,
TR_KEY_errorString,
TR_KEY_eta,
TR_KEY_etaIdle,
TR_KEY_failure_reason,
TR_KEY_fields,
TR_KEY_fileStats,

View file

@ -34,7 +34,7 @@
#include "version.h"
#include "web.h"
#define RPC_VERSION 14
#define RPC_VERSION 15
#define RPC_VERSION_MIN 1
#define RECENTLY_ACTIVE_SECONDS 60
@ -760,6 +760,10 @@ addField (tr_torrent * const tor,
tr_variantDictAddInt (d, key, st->queuePosition);
break;
case TR_KEY_etaIdle:
tr_variantDictAddInt (d, key, st->etaIdle);
break;
case TR_KEY_rateDownload:
tr_variantDictAddInt (d, key, toSpeedBytes (st->pieceDownloadSpeed_KBps));
break;