mirror of
https://github.com/transmission/transmission.git
synced 2026-05-08 09:39:08 +01:00
#1869 Move the finished state to libtransmission. This setting is now remembered between launches. This also causes torrents that hit the seed ratio to not have this setting changed to unlimited until start.
This commit is contained in:
@@ -30,6 +30,9 @@
|
||||
#include "version.h"
|
||||
#include "web.h"
|
||||
|
||||
#define RPC_VERSION 9
|
||||
#define RPC_VERSION_MIN 1
|
||||
|
||||
#define RECENTLY_ACTIVE_SECONDS 60
|
||||
|
||||
#define TR_N_ELEMENTS( ary ) ( sizeof( ary ) / sizeof( *ary ) )
|
||||
@@ -502,6 +505,8 @@ addField( const tr_torrent * tor, tr_benc * d, const char * key )
|
||||
tr_bencDictAddBool( d, key, tr_torrentUsesSessionLimits( tor ) );
|
||||
else if( tr_streq( key, keylen, "id" ) )
|
||||
tr_bencDictAddInt( d, key, st->id );
|
||||
else if( tr_streq( key, keylen, "isFinished" ) )
|
||||
tr_bencDictAddBool( d, key, st->finished );
|
||||
else if( tr_streq( key, keylen, "isPrivate" ) )
|
||||
tr_bencDictAddBool( d, key, tr_torrentIsPrivate( tor ) );
|
||||
else if( tr_streq( key, keylen, "leftUntilDone" ) )
|
||||
@@ -1306,8 +1311,8 @@ sessionGet( tr_session * s,
|
||||
tr_bencDictAddInt ( d, TR_PREFS_KEY_PEER_PORT_RANDOM_ON_START, tr_sessionGetPeerPortRandomOnStart( s ) );
|
||||
tr_bencDictAddBool( d, TR_PREFS_KEY_PORT_FORWARDING, tr_sessionIsPortForwardingEnabled( s ) );
|
||||
tr_bencDictAddBool( d, TR_PREFS_KEY_RENAME_PARTIAL_FILES, tr_sessionIsIncompleteFileNamingEnabled( s ) );
|
||||
tr_bencDictAddInt ( d, "rpc-version", 8 );
|
||||
tr_bencDictAddInt ( d, "rpc-version-minimum", 1 );
|
||||
tr_bencDictAddInt ( d, "rpc-version", RPC_VERSION );
|
||||
tr_bencDictAddInt ( d, "rpc-version-minimum", RPC_VERSION_MIN );
|
||||
tr_bencDictAddReal( d, "seedRatioLimit", tr_sessionGetRatioLimit( s ) );
|
||||
tr_bencDictAddBool( d, "seedRatioLimited", tr_sessionIsRatioLimited( s ) );
|
||||
tr_bencDictAddBool( d, TR_PREFS_KEY_START, !tr_sessionGetPaused( s ) );
|
||||
|
||||
Reference in New Issue
Block a user