mirror of
https://github.com/transmission/transmission
synced 2024-12-22 07:42:37 +00:00
Return session ID as part of "session-get" response
This commit is contained in:
parent
ff73e65069
commit
661e2b513d
4 changed files with 10 additions and 2 deletions
|
@ -518,8 +518,8 @@
|
|||
|
||||
Method name: "session-set"
|
||||
Request arguments: one or more of 4.1's arguments, except: "blocklist-size",
|
||||
"config-dir", "rpc-version", "rpc-version-minimum", and
|
||||
"version"
|
||||
"config-dir", "rpc-version", "rpc-version-minimum",
|
||||
"version", and "session-id"
|
||||
Response arguments: none
|
||||
|
||||
4.1.2. Accessors
|
||||
|
@ -768,6 +768,7 @@
|
|||
| | yes | torrent-add | new return arg "torrent-duplicate"
|
||||
------+---------+-----------+----------------------+-------------------------------
|
||||
16 | 3.00 | yes | session-get | new request arg "fields"
|
||||
| | yes | session-get | new arg "session-id"
|
||||
|
||||
5.1. Upcoming Breakage
|
||||
|
||||
|
|
|
@ -315,6 +315,7 @@ static const struct tr_key_struct my_static[] =
|
|||
{ "seederCount", 11 },
|
||||
{ "seeding-time-seconds", 20 },
|
||||
{ "session-count", 13 },
|
||||
{ "session-id", 10 },
|
||||
{ "sessionCount", 12 },
|
||||
{ "show-backup-trackers", 20 },
|
||||
{ "show-extra-peer-details", 23 },
|
||||
|
|
|
@ -316,6 +316,7 @@ enum
|
|||
TR_KEY_seederCount,
|
||||
TR_KEY_seeding_time_seconds,
|
||||
TR_KEY_session_count,
|
||||
TR_KEY_session_id,
|
||||
TR_KEY_sessionCount,
|
||||
TR_KEY_show_backup_trackers,
|
||||
TR_KEY_show_extra_peer_details,
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include "platform-quota.h" /* tr_device_info_get_free_space() */
|
||||
#include "rpcimpl.h"
|
||||
#include "session.h"
|
||||
#include "session-id.h"
|
||||
#include "torrent.h"
|
||||
#include "utils.h"
|
||||
#include "variant.h"
|
||||
|
@ -2260,6 +2261,10 @@ addSessionField (tr_session * s,
|
|||
tr_variantDictAddStr (d, key, str);
|
||||
break;
|
||||
}
|
||||
|
||||
case TR_KEY_session_id:
|
||||
tr_variantDictAddStr (d, key, tr_session_id_get_current (s->session_id));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue