mirror of https://github.com/aria2/aria2
--dir and --out option is now available in aria2.changeOption.
--dir and --out option is now available in aria2.changeOption if a download is waiting/paused in queue.pull/2/head
parent
9a51cc356b
commit
701a2d6ff8
|
@ -213,6 +213,7 @@ OptionHandlerFactory::createOptionHandlers()
|
||||||
op->addTag(TAG_FILE);
|
op->addTag(TAG_FILE);
|
||||||
op->setInitialOption(true);
|
op->setInitialOption(true);
|
||||||
op->setChangeGlobalOption(true);
|
op->setChangeGlobalOption(true);
|
||||||
|
op->setChangeOptionForReserved(true);
|
||||||
handlers.push_back(op);
|
handlers.push_back(op);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
@ -848,6 +849,7 @@ OptionHandlerFactory::createOptionHandlers()
|
||||||
op->addTag(TAG_HTTP);
|
op->addTag(TAG_HTTP);
|
||||||
op->addTag(TAG_FILE);
|
op->addTag(TAG_FILE);
|
||||||
op->setInitialOption(true);
|
op->setInitialOption(true);
|
||||||
|
op->setChangeOptionForReserved(true);
|
||||||
handlers.push_back(op);
|
handlers.push_back(op);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
|
|
@ -1147,6 +1147,15 @@ void changeOption
|
||||||
(*i)->setMaxConnectionPerServer(maxConn);
|
(*i)->setMaxConnectionPerServer(maxConn);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(option.defined(PREF_DIR) || option.defined(PREF_OUT)) {
|
||||||
|
if(dctx->getFileEntries().size() == 1 &&
|
||||||
|
!dctx->hasAttribute(bittorrent::BITTORRENT)) {
|
||||||
|
dctx->getFirstFileEntry()->setPath
|
||||||
|
(group->getOption()->blank(PREF_OUT) ? A2STR::NIL :
|
||||||
|
util::applyDir(group->getOption()->get(PREF_DIR),
|
||||||
|
group->getOption()->get(PREF_OUT)));
|
||||||
|
}
|
||||||
|
}
|
||||||
if(option.defined(PREF_MAX_DOWNLOAD_LIMIT)) {
|
if(option.defined(PREF_MAX_DOWNLOAD_LIMIT)) {
|
||||||
group->setMaxDownloadSpeedLimit
|
group->setMaxDownloadSpeedLimit
|
||||||
(option.getAsInt(PREF_MAX_DOWNLOAD_LIMIT));
|
(option.getAsInt(PREF_MAX_DOWNLOAD_LIMIT));
|
||||||
|
|
Loading…
Reference in New Issue