From 35f08f05efcb2c7503abe11af036e8533d5a7b71 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sun, 29 Nov 2015 18:54:19 +0900 Subject: Add --bt-enable-hook-after-hash-check option This option sets flag which allows hook command invocation after hash check (see -V option) in BitTorrent download. By default, when hash check succeeds, the command given by --on-bt-download-complete is executed. To disable this action, give false to this option. --- src/OptionHandlerFactory.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/OptionHandlerFactory.cc') diff --git a/src/OptionHandlerFactory.cc b/src/OptionHandlerFactory.cc index 3967d3c7..02d78fc0 100644 --- a/src/OptionHandlerFactory.cc +++ b/src/OptionHandlerFactory.cc @@ -1749,6 +1749,18 @@ std::vector OptionHandlerFactory::createOptionHandlers() op->addTag(TAG_BITTORRENT); handlers.push_back(op); } + { + OptionHandler* op(new BooleanOptionHandler + (PREF_BT_ENABLE_HOOK_AFTER_HASH_CHECK, + TEXT_BT_ENABLE_HOOK_AFTER_HASH_CHECK, + A2_V_TRUE, + OptionHandler::OPT_ARG)); + op->addTag(TAG_BITTORRENT); + op->setInitialOption(true); + op->setChangeGlobalOption(true); + op->setChangeOptionForReserved(true); + handlers.push_back(op); + } { OptionHandler* op(new BooleanOptionHandler (PREF_BT_ENABLE_LPD, -- cgit