mirror of https://github.com/aria2/aria2
Made --uri-selector option available in -i list.
parent
6bc6825cec
commit
c8ed44b18f
|
@ -1613,6 +1613,7 @@ of URIs. These optional lines must start with white space(s).
|
|||
* *<<aria2_optref_hash_check_only, hash-check-only>>*
|
||||
* *<<aria2_optref_checksum, checksum>>*
|
||||
* *<<aria2_optref_piece_length, piece_length>>*
|
||||
* *<<aria2_optref_uri_selector, uri-selector>>*
|
||||
|
||||
These options have exactly same meaning of the ones in the
|
||||
command-line options, but it just applies to the URIs it belongs to.
|
||||
|
|
|
@ -220,6 +220,7 @@ OptionParser.new do |opt|
|
|||
}
|
||||
opt.on("--checksum TYPE_DIGEST"){|val| options["checksum"]=val}
|
||||
opt.on("--piece-length LENGTH"){|val| options["piece-length"]=val}
|
||||
opt.on("--uri-selector SELECTOR"){|val| options["uri-selector"]=val}
|
||||
|
||||
opt.on("--max-overall-download-limit LIMIT"){|val| options["max-overall-download-limit"]=val}
|
||||
opt.on("--max-overall-upload-limit LIMIT"){|val| options["max-overall-upload-limit"]=val}
|
||||
|
|
|
@ -930,6 +930,7 @@ OptionHandlers OptionHandlerFactory::createOptionHandlers()
|
|||
(vbegin(params), vend(params))));
|
||||
op->addTag(TAG_FTP);
|
||||
op->addTag(TAG_HTTP);
|
||||
op->setInitialOption(true);
|
||||
handlers.push_back(op);
|
||||
}
|
||||
// HTTP Specific Options
|
||||
|
|
|
@ -454,16 +454,17 @@ void RequestGroupMan::removeStoppedGroup(DownloadEngine* e)
|
|||
void RequestGroupMan::configureRequestGroup
|
||||
(const SharedHandle<RequestGroup>& requestGroup) const
|
||||
{
|
||||
const std::string& uriSelectorValue = option_->get(PREF_URI_SELECTOR);
|
||||
const std::string& uriSelectorValue =
|
||||
requestGroup->getOption()->get(PREF_URI_SELECTOR);
|
||||
SharedHandle<URISelector> sel;
|
||||
if(uriSelectorValue == V_FEEDBACK) {
|
||||
SharedHandle<URISelector> sel(new FeedbackURISelector(serverStatMan_));
|
||||
requestGroup->setURISelector(sel);
|
||||
sel.reset(new FeedbackURISelector(serverStatMan_));
|
||||
} else if(uriSelectorValue == V_INORDER) {
|
||||
SharedHandle<URISelector> sel(new InorderURISelector());
|
||||
requestGroup->setURISelector(sel);
|
||||
sel.reset(new InorderURISelector());
|
||||
} else if(uriSelectorValue == V_ADAPTIVE) {
|
||||
SharedHandle<URISelector> sel(new AdaptiveURISelector(serverStatMan_,
|
||||
requestGroup.get()));
|
||||
sel.reset(new AdaptiveURISelector(serverStatMan_, requestGroup.get()));
|
||||
}
|
||||
if(sel) {
|
||||
requestGroup->setURISelector(sel);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue