mirror of
https://github.com/transmission/transmission
synced 2025-02-20 21:26:53 +00:00
commit tiennou's "transmissioncli -f" patch for ticket #322
This commit is contained in:
parent
b670e8e14a
commit
1fb09fafa1
2 changed files with 16 additions and 2 deletions
|
@ -95,6 +95,8 @@ Specifies the maximum download rate in kB/s, which defaults to -1 for
|
|||
no download limit.
|
||||
.It Fl f, -finish Ar script
|
||||
Specifies a shell script to be executed upon successful download.
|
||||
.It Fl y, Fl -recheck
|
||||
Force a recheck of the torrent data.
|
||||
.Sh SIGNALS
|
||||
In addition to these options, sending
|
||||
.Nm
|
||||
|
|
|
@ -55,7 +55,8 @@ const char * USAGE =
|
|||
" -p, --port <int> Port we should listen on (default = %d)\n"
|
||||
" -s, --scrape Print counts of seeders/leechers and exit\n"
|
||||
" -u, --upload <int> Maximum upload rate (-1 = no limit, default = 20)\n"
|
||||
" -v, --verbose <int> Verbose level (0 to 2, default = 0)\n";
|
||||
" -v, --verbose <int> Verbose level (0 to 2, default = 0)\n"
|
||||
" -y, --recheck Force a recheck of the torrent data\n";
|
||||
|
||||
static int showHelp = 0;
|
||||
static int showInfo = 0;
|
||||
|
@ -68,6 +69,7 @@ static int downloadLimit = -1;
|
|||
static char * torrentPath = NULL;
|
||||
static char * savePath = ".";
|
||||
static int natTraversal = 0;
|
||||
static int recheckData = 0;
|
||||
static sig_atomic_t gotsig = 0;
|
||||
static sig_atomic_t manualUpdate = 0;
|
||||
static tr_torrent * tor;
|
||||
|
@ -274,6 +276,12 @@ int main( int argc, char ** argv )
|
|||
tr_manualUpdate( tor );
|
||||
}
|
||||
}
|
||||
|
||||
if( recheckData )
|
||||
{
|
||||
recheckData = 0;
|
||||
tr_torrentRecheck( tor );
|
||||
}
|
||||
|
||||
s = tr_torrentStat( tor );
|
||||
|
||||
|
@ -364,11 +372,12 @@ static int parseCommandLine( int argc, char ** argv )
|
|||
{ "comment", required_argument, NULL, 'm' },
|
||||
{ "announce", required_argument, NULL, 'a' },
|
||||
{ "nat-traversal", no_argument, NULL, 'n' },
|
||||
{ "recheck", no_argument, NULL, 'y' },
|
||||
{ "output-dir", required_argument, NULL, 'o' },
|
||||
{ 0, 0, 0, 0} };
|
||||
|
||||
int c, optind = 0;
|
||||
c = getopt_long( argc, argv, "hisrv:p:u:d:f:c:m:a:n:o",
|
||||
c = getopt_long( argc, argv, "hisrv:p:u:d:f:c:m:a:n:o:y",
|
||||
long_options, &optind );
|
||||
if( c < 0 )
|
||||
{
|
||||
|
@ -415,6 +424,9 @@ static int parseCommandLine( int argc, char ** argv )
|
|||
case 'n':
|
||||
natTraversal = 1;
|
||||
break;
|
||||
case 'y':
|
||||
recheckData = 1;
|
||||
break;
|
||||
case 'o':
|
||||
savePath = optarg;
|
||||
default:
|
||||
|
|
Loading…
Reference in a new issue