summaryrefslogtreecommitdiff
path: root/src/OptionHandlerFactory.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2012-10-16 00:18:34 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2012-10-16 00:18:34 +0900
commita9c76ed35e3b6025b68f85d8e1d1efd339e735f6 (patch)
treeae34cab97605e3f31b9ea4f7d3a58a6ebe2bb05b /src/OptionHandlerFactory.cc
parent4a4fec2c8c17dad5d1983adeb1857c1a082e75f0 (diff)
Added --rpc-save-upload-metadata option
If true is given, which is default, save the uploaded torrent or metalink metadata in the directory specified by --dir option. The filename consists of SHA1-hash hex string of metadata plus extension. For torrent, the extension is '.torrent'. For metalink, it is '.meta4'. If false is given to this option, the downloads added by aria2.addTorrent or aria2.addMetalink will not be saved by --save-session option.
Diffstat (limited to 'src/OptionHandlerFactory.cc')
-rw-r--r--src/OptionHandlerFactory.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/OptionHandlerFactory.cc b/src/OptionHandlerFactory.cc
index 562f947b..d0fe9f3e 100644
--- a/src/OptionHandlerFactory.cc
+++ b/src/OptionHandlerFactory.cc
@@ -794,6 +794,17 @@ std::vector<OptionHandler*> OptionHandlerFactory::createOptionHandlers()
}
{
OptionHandler* op(new BooleanOptionHandler
+ (PREF_RPC_SAVE_UPLOAD_METADATA,
+ TEXT_RPC_SAVE_UPLOAD_METADATA,
+ A2_V_TRUE,
+ OptionHandler::OPT_ARG));
+ op->addTag(TAG_RPC);
+ op->setInitialOption(true);
+ op->setChangeGlobalOption(true);
+ handlers.push_back(op);
+ }
+ {
+ OptionHandler* op(new BooleanOptionHandler
(PREF_RPC_SECURE,
TEXT_RPC_SECURE,
A2_V_FALSE,