mirror of https://github.com/aria2/aria2
2007-12-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added --metalink-enable-unique-protocol option. * src/Metalink2RequestGroup.cc * src/option_processing.cc * src/prefs.h * src/version_usage.cc * doc/aria2c.1.txt * doc/aria2c.1pull/1/head
parent
51cb6b5ba9
commit
7ff1f5a620
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
||||||
|
2007-12-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||||
|
|
||||||
|
Added --metalink-enable-unique-protocol option.
|
||||||
|
* src/Metalink2RequestGroup.cc
|
||||||
|
* src/option_processing.cc
|
||||||
|
* src/prefs.h
|
||||||
|
* src/version_usage.cc
|
||||||
|
* doc/aria2c.1.txt
|
||||||
|
* doc/aria2c.1
|
||||||
|
|
||||||
2007-12-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
2007-12-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||||
|
|
||||||
Allow a peer in incomingPeer to be added peers.
|
Allow a peer in incomingPeer to be added peers.
|
||||||
|
|
11
doc/aria2c.1
11
doc/aria2c.1
|
@ -1,11 +1,11 @@
|
||||||
.\" Title: aria2c
|
.\" Title: aria2c
|
||||||
.\" Author:
|
.\" Author:
|
||||||
.\" Generator: DocBook XSL Stylesheets v1.73.1 <http://docbook.sf.net/>
|
.\" Generator: DocBook XSL Stylesheets v1.73.1 <http://docbook.sf.net/>
|
||||||
.\" Date: 12/12/2007
|
.\" Date: 12/22/2007
|
||||||
.\" Manual:
|
.\" Manual:
|
||||||
.\" Source:
|
.\" Source:
|
||||||
.\"
|
.\"
|
||||||
.TH "ARIA2C" "1" "12/12/2007" "" ""
|
.TH "ARIA2C" "1" "12/22/2007" "" ""
|
||||||
.\" disable hyphenation
|
.\" disable hyphenation
|
||||||
.nh
|
.nh
|
||||||
.\" disable justification (adjust text to left margin only)
|
.\" disable justification (adjust text to left margin only)
|
||||||
|
@ -467,6 +467,13 @@ is specified, the action mentioned above is not taken\. Default:
|
||||||
\fItrue\fR
|
\fItrue\fR
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
|
\-\-metalink\-enable\-unique\-protocol=\fItrue\fR|\fIfalse\fR
|
||||||
|
.RS 4
|
||||||
|
If
|
||||||
|
\fItrue\fR
|
||||||
|
is given and several protocols are available for a mirror in a metalink file, aria2 uses one of them\. Use \-\-metalink\-preferred\-protocol option to specify the preference of protocol\. Default: true
|
||||||
|
.RE
|
||||||
|
.PP
|
||||||
\-v, \-\-version
|
\-v, \-\-version
|
||||||
.RS 4
|
.RS 4
|
||||||
Print the version number, copyright and the configuration information and exit\.
|
Print the version number, copyright and the configuration information and exit\.
|
||||||
|
|
|
@ -333,6 +333,13 @@ OPTIONS
|
||||||
If 'false' is specified, the action mentioned above is not taken.
|
If 'false' is specified, the action mentioned above is not taken.
|
||||||
Default: 'true'
|
Default: 'true'
|
||||||
|
|
||||||
|
--metalink-enable-unique-protocol='true'|'false'::
|
||||||
|
If 'true' is given and several protocols are available for a mirror in a
|
||||||
|
metalink file, aria2 uses one of them.
|
||||||
|
Use --metalink-preferred-protocol option to specify the preference of
|
||||||
|
protocol.
|
||||||
|
Default: true
|
||||||
|
|
||||||
-v, --version::
|
-v, --version::
|
||||||
Print the version number, copyright and the configuration information and
|
Print the version number, copyright and the configuration information and
|
||||||
exit.
|
exit.
|
||||||
|
|
|
@ -199,9 +199,9 @@ RequestGroups Metalink2RequestGroup::createRequestGroup(MetalinkEntries entries)
|
||||||
rg->setNumConcurrentCommand(entry->maxConnections < 0 ?
|
rg->setNumConcurrentCommand(entry->maxConnections < 0 ?
|
||||||
_option->getAsInt(PREF_METALINK_SERVERS) :
|
_option->getAsInt(PREF_METALINK_SERVERS) :
|
||||||
min<int32_t>(_option->getAsInt(PREF_METALINK_SERVERS), entry->maxConnections));
|
min<int32_t>(_option->getAsInt(PREF_METALINK_SERVERS), entry->maxConnections));
|
||||||
// In metalink, multi connection to a single host is not allowed.
|
// In metalink, multi connection to a single host is not allowed by default.
|
||||||
rg->setSingleHostMultiConnectionEnabled(false);
|
rg->setSingleHostMultiConnectionEnabled(!_option->getAsBool(PREF_METALINK_ENABLE_UNIQUE_PROTOCOL));
|
||||||
|
|
||||||
#ifdef ENABLE_BITTORRENT
|
#ifdef ENABLE_BITTORRENT
|
||||||
// Inject depenency between rg and torrentRg here if torrentRg.isNull() == false
|
// Inject depenency between rg and torrentRg here if torrentRg.isNull() == false
|
||||||
if(!torrentRg.isNull()) {
|
if(!torrentRg.isNull()) {
|
||||||
|
|
|
@ -130,6 +130,7 @@ Option* option_processing(int argc, char* const argv[])
|
||||||
op->put(PREF_ALLOW_PIECE_LENGTH_CHANGE, V_FALSE);
|
op->put(PREF_ALLOW_PIECE_LENGTH_CHANGE, V_FALSE);
|
||||||
op->put(PREF_METALINK_PREFERRED_PROTOCOL, V_NONE);
|
op->put(PREF_METALINK_PREFERRED_PROTOCOL, V_NONE);
|
||||||
op->put(PREF_ENABLE_PEER_EXCHANGE, V_TRUE);
|
op->put(PREF_ENABLE_PEER_EXCHANGE, V_TRUE);
|
||||||
|
op->put(PREF_METALINK_ENABLE_UNIQUE_PROTOCOL, V_TRUE);
|
||||||
while(1) {
|
while(1) {
|
||||||
int optIndex = 0;
|
int optIndex = 0;
|
||||||
int lopt;
|
int lopt;
|
||||||
|
@ -208,6 +209,7 @@ Option* option_processing(int argc, char* const argv[])
|
||||||
{ "follow-metalink", required_argument, &lopt, 103 },
|
{ "follow-metalink", required_argument, &lopt, 103 },
|
||||||
{ "metalink-location", required_argument, &lopt, 104 },
|
{ "metalink-location", required_argument, &lopt, 104 },
|
||||||
{ "metalink-preferred-protocol", required_argument, &lopt, 105 },
|
{ "metalink-preferred-protocol", required_argument, &lopt, 105 },
|
||||||
|
{ "metalink-enable-unique-protocol", optional_argument, &lopt, 106 },
|
||||||
#endif // ENABLE_METALINK
|
#endif // ENABLE_METALINK
|
||||||
{ "version", no_argument, NULL, 'v' },
|
{ "version", no_argument, NULL, 'v' },
|
||||||
{ "help", no_argument, NULL, 'h' },
|
{ "help", no_argument, NULL, 'h' },
|
||||||
|
@ -306,6 +308,9 @@ Option* option_processing(int argc, char* const argv[])
|
||||||
case 105:
|
case 105:
|
||||||
cmdstream << PREF_METALINK_PREFERRED_PROTOCOL << "=" << optarg << "\n";
|
cmdstream << PREF_METALINK_PREFERRED_PROTOCOL << "=" << optarg << "\n";
|
||||||
break;
|
break;
|
||||||
|
case 106:
|
||||||
|
cmdstream << PREF_METALINK_ENABLE_UNIQUE_PROTOCOL << "=" << toBoolArg(optarg) << "\n";
|
||||||
|
break;
|
||||||
case 200:
|
case 200:
|
||||||
cmdstream << PREF_LOWEST_SPEED_LIMIT << "=" << optarg << "\n";
|
cmdstream << PREF_LOWEST_SPEED_LIMIT << "=" << optarg << "\n";
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -232,5 +232,7 @@
|
||||||
# define V_HTTP "http"
|
# define V_HTTP "http"
|
||||||
# define V_HTTPS "https"
|
# define V_HTTPS "https"
|
||||||
# define V_FTP "ftp"
|
# define V_FTP "ftp"
|
||||||
|
// values: true | false
|
||||||
|
#define PREF_METALINK_ENABLE_UNIQUE_PROTOCOL "metalink-enable-unique-protocol"
|
||||||
|
|
||||||
#endif // _D_PREFS_H_
|
#endif // _D_PREFS_H_
|
||||||
|
|
|
@ -314,6 +314,12 @@ void showUsage() {
|
||||||
" If false is specified, the action mentioned above\n"
|
" If false is specified, the action mentioned above\n"
|
||||||
" is not taken.") << "\n"
|
" is not taken.") << "\n"
|
||||||
<< DEFAULT_MSG << "true" << "\n";
|
<< DEFAULT_MSG << "true" << "\n";
|
||||||
|
cout << _(" --metalink-enable-unique-protocol=true|false If true is given and several\n"
|
||||||
|
" protocols are available for a mirror in a metalink\n"
|
||||||
|
" file, aria2 uses one of them.\n"
|
||||||
|
" Use --metalink-preferred-protocol option to\n"
|
||||||
|
" specify the preference of protocol.") << "\n"
|
||||||
|
<< DEFAULT_MSG << "true" << "\n";
|
||||||
#endif // ENABLE_METALINK
|
#endif // ENABLE_METALINK
|
||||||
cout << _(" -v, --version Print the version number and exit.") << endl;
|
cout << _(" -v, --version Print the version number and exit.") << endl;
|
||||||
cout << _(" -h, --help Print this message and exit.") << endl;
|
cout << _(" -h, --help Print this message and exit.") << endl;
|
||||||
|
|
Loading…
Reference in New Issue