--select-file option is now available in aria2.changeOption

--select-file option is now available in aria2.changeOption if a
download is waiting/paused in queue.
pull/2/head
Tatsuhiro Tsujikawa 2011-10-30 19:13:40 +09:00
parent 4552bb8c21
commit 1d9e673a68
2 changed files with 7 additions and 0 deletions

View File

@ -1475,6 +1475,7 @@ OptionHandlerFactory::createOptionHandlers()
op->addTag(TAG_BITTORRENT);
op->addTag(TAG_METALINK);
op->setInitialOption(true);
op->setChangeOptionForReserved(true);
handlers.push_back(op);
}
{

View File

@ -1128,6 +1128,12 @@ void changeOption
util::lowercase(p.second);
dctx->setDigest(p.first, util::fromHex(p.second));
}
if(option.defined(PREF_SELECT_FILE)) {
SegList<int> sgl;
util::parseIntSegments(sgl, option.get(PREF_SELECT_FILE));
sgl.normalize();
dctx->setFileFilter(sgl);
}
if(option.defined(PREF_MAX_DOWNLOAD_LIMIT)) {
group->setMaxDownloadSpeedLimit
(option.getAsInt(PREF_MAX_DOWNLOAD_LIMIT));