summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2011-10-30 19:13:40 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2011-10-30 19:13:40 +0900
commit1d9e673a68467617eda25b0cf84d760af3e522d5 (patch)
tree247a44d607c43cfabae70fc4bc363585123aa7b9 /src
parent4552bb8c218d326497aa7effc265492299f73c54 (diff)
--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.
Diffstat (limited to 'src')
-rw-r--r--src/OptionHandlerFactory.cc1
-rw-r--r--src/RpcMethodImpl.cc6
2 files changed, 7 insertions, 0 deletions
diff --git a/src/OptionHandlerFactory.cc b/src/OptionHandlerFactory.cc
index 587c9a6b..c58139ce 100644
--- a/src/OptionHandlerFactory.cc
+++ b/src/OptionHandlerFactory.cc
@@ -1475,6 +1475,7 @@ OptionHandlerFactory::createOptionHandlers()
op->addTag(TAG_BITTORRENT);
op->addTag(TAG_METALINK);
op->setInitialOption(true);
+ op->setChangeOptionForReserved(true);
handlers.push_back(op);
}
{
diff --git a/src/RpcMethodImpl.cc b/src/RpcMethodImpl.cc
index ad184537..080ab592 100644
--- a/src/RpcMethodImpl.cc
+++ b/src/RpcMethodImpl.cc
@@ -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));