]> granicus.if.org Git - transmission/commitdiff
(trunk daemon) #3580 "feature request: transmission-remote manual update trackers...
authorCharles Kerr <charles@transmissionbt.com>
Sun, 12 Dec 2010 15:58:06 +0000 (15:58 +0000)
committerCharles Kerr <charles@transmissionbt.com>
Sun, 12 Dec 2010 15:58:06 +0000 (15:58 +0000)
daemon/remote.c
daemon/transmission-remote.1

index 6a105ae5e861aff6428f8cb16c29a39148b955a6..e9efbbec6c50db204fb769ee151321c57022cf25 100644 (file)
@@ -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, "<max>" },
     { '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;
index 53c296228014438f3c96fb662163a8a717651ed1..0939e75c8e6594025579050497005f6a2889d171 100644 (file)
@@ -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