From 07d58516cde058702d0dac3a8acb881e742cf810 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Sun, 12 Dec 2010 15:58:06 +0000 Subject: [PATCH] (trunk daemon) #3580 "feature request: transmission-remote manual update trackers option" -- added. --- daemon/remote.c | 15 +++++++++++++++ daemon/transmission-remote.1 | 2 ++ 2 files changed, 17 insertions(+) diff --git a/daemon/remote.c b/daemon/remote.c index 6a105ae5e..e9efbbec6 100644 --- a/daemon/remote.c +++ b/daemon/remote.c @@ -268,6 +268,7 @@ static tr_option opts[] = { 700, "bandwidth-high", "Give this torrent first chance at available bandwidth", "Bh", 0, NULL }, { 701, "bandwidth-normal", "Give this torrent bandwidth left over by high priority torrents", "Bn", 0, NULL }, { 702, "bandwidth-low", "Give this torrent bandwidth left over by high and normal priority torrents", "Bl", 0, NULL }, + { 600, "reannounce", "Reannounce the current torrent(s)", NULL, 0, NULL }, { 'r', "remove", "Remove the current torrent(s)", "r", 0, NULL }, { 930, "peers", "Set the maximum number of peers for the current torrent(s) or globally", "pr", 1, "" }, { 'R', "remove-and-delete", "Remove the current torrent(s) and delete local data", NULL, 0, NULL }, @@ -450,6 +451,9 @@ getOptMode( int val ) case 'v': /* verify */ return MODE_TORRENT_VERIFY; + case 600: /* reannounce */ + return MODE_TORRENT_REANNOUNCE; + case 962: /* port-test */ return MODE_PORT_TEST; @@ -2194,6 +2198,17 @@ processArgs( const char * host, int port, int argc, const char ** argv ) status |= flush( host, port, &top ); break; } + case 600: + { + tr_benc * top; + if( tset != 0 ) { addIdArg( tr_bencDictFind( tset, ARGUMENTS ), id ); status |= flush( host, port, &tset ); } + top = tr_new0( tr_benc, 1 ); + tr_bencInitDict( top, 2 ); + tr_bencDictAddStr( top, "method", "torrent-reannounce" ); + addIdArg( tr_bencDictAddDict( top, ARGUMENTS, 1 ), id ); + status |= flush( host, port, &top ); + break; + } case 'v': { tr_benc * top; diff --git a/daemon/transmission-remote.1 b/daemon/transmission-remote.1 index 53c296228..0939e75c8 100644 --- a/daemon/transmission-remote.1 +++ b/daemon/transmission-remote.1 @@ -215,6 +215,8 @@ If current torrent(s) are selected this operates on them. Otherwise, it changes Remove the current torrent(s). This does not delete the downloaded data. .It Fl -remove-and-delete Remove the current torrent(s) and delete their downloaded data. +.It Fl -reannounce +Reannounce the current torrent(s). This is the same as the GUI's "ask tracker for more peers" button. .It Fl -move Move the current torrents' data from their current locations to the specified directory. .It Fl -find