(trunk daemon) #3244 "Transmission-remote doesn't have switch(s) to set torrent bandwidth priorities" -- added to trunk for 2.00

This commit is contained in:
Charles Kerr 2010-05-30 14:11:07 +00:00
parent 9b5ca03304
commit d426654709
2 changed files with 33 additions and 12 deletions

View File

@ -228,9 +228,12 @@ static tr_option opts[] =
{ 'p', "port", "Port for incoming peers (Default: " TR_DEFAULT_PEER_PORT_STR ")", "p", 1, "<port>" },
{ 962, "port-test", "Port testing", "pt", 0, NULL },
{ 'P', "random-port", "Random port for incomping peers", "P", 0, NULL },
{ 900, "priority-high", "Set the files' priorities as high", "ph", 1, "<files>" },
{ 901, "priority-normal", "Set the files' priorities as normal", "pn", 1, "<files>" },
{ 902, "priority-low", "Set the files' priorities as low", "pl", 1, "<files>" },
{ 900, "file-priority-high", "Set the files' priorities as high", "fh", 1, "<files>" },
{ 901, "file-priority-normal", "Set the files' priorities as normal", "fn", 1, "<files>" },
{ 902, "file-priority-low", "Set the files' priorities as low", "fl", 1, "<files>" },
{ 700, "torrent-priority-high", "Set the current torrent(s)' priorities as high", "th", 0, NULL },
{ 701, "torrent-priority-normal","Set the current torrent(s)' priorities as normal", "tn", 0, NULL },
{ 702, "torrent-priority-low", "Set the current torrent(s)' priorities as low", "tl", 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 },
@ -363,9 +366,12 @@ getOptMode( int val )
case 'g': /* get */
case 'G': /* no-get */
case 900: /* priority-high */
case 901: /* priority-normal */
case 902: /* priority-low */
case 700: /* torrent priority-high */
case 701: /* torrent priority-normal */
case 702: /* torrent priority-low */
case 900: /* file priority-high */
case 901: /* file priority-normal */
case 902: /* file priority-low */
return MODE_TORRENT_SET | MODE_TORRENT_ADD;
case 961: /* find */
@ -1942,6 +1948,12 @@ processArgs( const char * host, int port, int argc, const char ** argv )
break;
case 902: addFiles( args, "priority-low", optarg );
break;
case 700: tr_bencDictAddInt( args, "bandwidthPriority", 1 );
break;
case 701: tr_bencDictAddInt( args, "bandwidthPriority", 0 );
break;
case 702: tr_bencDictAddInt( args, "bandwidthPriority", -1 );
break;
default: assert( "unhandled value" && 0 );
break;
}

View File

@ -35,9 +35,12 @@ and
.Op Fl N Ar netrc
.Op Fl o | O
.Op Fl p Ar port
.Op Fl ph Ar files
.Op Fl pl Ar files
.Op Fl pn Ar files
.Op Fl th
.Op Fl tn
.Op Fl tl
.Op Fl fh Ar files
.Op Fl fl Ar files
.Op Fl fn Ar files
.Op Fl pr Ar peers
.Op Fl r
.Op Fl R
@ -177,7 +180,13 @@ Disable distribued hash table (DHT).
Set the
.Ar port
for use when listening for incoming peer connections
.It Fl pn Fl -priority-normal Ar all | file-index | files
.It Fl tn Fl -torrent-priority-normal
Mark the current torrent(s) as normal priority.
.It Fl tn Fl -torrent-priority-high
Mark the current torrent(s) as high priority.
.It Fl tn Fl -torrent-priority-low
Mark the current torrent(s) as low priority.
.It Fl fn Fl -file-priority-normal Ar all | file-index | files
Mark file(s) as normal priority.
.Ar all
marks all of the torrent's files as normal priority,
@ -186,9 +195,9 @@ sets a single file's priority as normal, and
.Ar files
sets multiple files' priorities as normal,
such as "\-pn1,3-5" to normalize files #1, #3, #4, and #5.
.It Fl ph Fl -priority-high Ar all | file-index | files
.It Fl fh Fl -file-priority-high Ar all | file-index | files
Mark file(s) as high priority.
.It Fl pl Fl -priority-low Ar all | file-index | files
.It Fl fl Fl -file-priority-low Ar all | file-index | files
Mark file(s) as low priority.
.It Fl pr Fl -peers Ar number
Set the maximum number of peers.