(libT) restore the RPC download-dir-free-space argument to avoid unscheduled breakage. Document the timetable for its removal in rpc-spec.txt.
This commit is contained in:
parent
a7b3ec4d92
commit
5040778a92
|
@ -758,8 +758,20 @@
|
|||
| | yes | | new method "queue-move-bottom"
|
||||
| | yes | | new method "torrent-start-now"
|
||||
------+---------+-----------+--------------------------+-------------------------------
|
||||
15 | 2.80 | NO | session-get | removed arg "download-dir-free-space"
|
||||
| | yes | torrent-get | new arg "etaIdle"
|
||||
15 | 2.80 | yes | torrent-get | new arg "etaIdle"
|
||||
| | yes | torrent-rename-path | new method
|
||||
| | yes | free-space | new method
|
||||
|
||||
5.1. Upcoming Breakage
|
||||
|
||||
These features will be removed three months after 2.80's release:
|
||||
|
||||
1. session-get's 'download-dir-free-space' argument will be removed.
|
||||
Its functionality has been superceded by the 'free-space' method.
|
||||
|
||||
2. HTTP POSTs to http://server:port/transmission/upload will fail.
|
||||
It's been superceded by http://server:port/transmission/upload2.
|
||||
Example in https://trac.transmissionbt.com/changeset/14005/#file8
|
||||
NB: not to be confused with section 3.4's torrent-add method.
|
||||
/upload and /upload2 are undocumented features to help web clients
|
||||
upload .torrent files.
|
||||
|
|
|
@ -78,6 +78,7 @@ static const struct tr_key_struct my_static[] =
|
|||
{ "done-date", 9 },
|
||||
{ "doneDate", 8 },
|
||||
{ "download-dir", 12 },
|
||||
{ "download-dir-free-space", 23 },
|
||||
{ "download-queue-enabled", 22 },
|
||||
{ "download-queue-size", 19 },
|
||||
{ "downloadCount", 13 },
|
||||
|
|
|
@ -88,6 +88,7 @@ enum
|
|||
TR_KEY_done_date,
|
||||
TR_KEY_doneDate,
|
||||
TR_KEY_download_dir,
|
||||
TR_KEY_download_dir_free_space,
|
||||
TR_KEY_download_queue_enabled,
|
||||
TR_KEY_download_queue_size,
|
||||
TR_KEY_downloadCount,
|
||||
|
|
|
@ -106,6 +106,7 @@ test_session_get_and_set (void)
|
|||
check (tr_variantDictFind (args, TR_KEY_config_dir) != NULL);
|
||||
check (tr_variantDictFind (args, TR_KEY_dht_enabled) != NULL);
|
||||
check (tr_variantDictFind (args, TR_KEY_download_dir) != NULL);
|
||||
check (tr_variantDictFind (args, TR_KEY_download_dir_free_space) != NULL);
|
||||
check (tr_variantDictFind (args, TR_KEY_download_queue_enabled) != NULL);
|
||||
check (tr_variantDictFind (args, TR_KEY_download_queue_size) != NULL);
|
||||
check (tr_variantDictFind (args, TR_KEY_encryption) != NULL);
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include "completion.h"
|
||||
#include "fdlimit.h"
|
||||
#include "log.h"
|
||||
#include "platform.h" /* tr_device_info_get_free_space() */
|
||||
#include "rpcimpl.h"
|
||||
#include "session.h"
|
||||
#include "torrent.h"
|
||||
|
@ -1882,8 +1883,8 @@ sessionStats (tr_session * session,
|
|||
|
||||
static const char*
|
||||
sessionGet (tr_session * s,
|
||||
tr_variant * args_in UNUSED,
|
||||
tr_variant * args_out,
|
||||
tr_variant * args_in UNUSED,
|
||||
tr_variant * args_out,
|
||||
struct tr_rpc_idle_data * idle_data UNUSED)
|
||||
{
|
||||
const char * str;
|
||||
|
@ -1903,6 +1904,7 @@ sessionGet (tr_session * s,
|
|||
tr_variantDictAddInt (d, TR_KEY_blocklist_size, tr_blocklistGetRuleCount (s));
|
||||
tr_variantDictAddStr (d, TR_KEY_config_dir, tr_sessionGetConfigDir (s));
|
||||
tr_variantDictAddStr (d, TR_KEY_download_dir, tr_sessionGetDownloadDir (s));
|
||||
tr_variantDictAddInt (d, TR_KEY_download_dir_free_space, tr_device_info_get_free_space (s->downloadDir));
|
||||
tr_variantDictAddBool (d, TR_KEY_download_queue_enabled, tr_sessionGetQueueEnabled (s, TR_DOWN));
|
||||
tr_variantDictAddInt (d, TR_KEY_download_queue_size, tr_sessionGetQueueSize (s, TR_DOWN));
|
||||
tr_variantDictAddInt (d, TR_KEY_peer_limit_global, tr_sessionGetPeerLimit (s));
|
||||
|
|
Loading…
Reference in New Issue