diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2017-05-20 13:00:11 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2017-05-22 00:02:05 +0900 |
| commit | 9deb4210b2c94446126e66c7994d745643cd39c9 (patch) | |
| tree | b2ab4aefbd919c1ca59336bac5f4dd96d5fc1f17 /src/OptionHandlerFactory.cc | |
| parent | 8785342f8555992327f1ab0f7060c7e69dde5fd2 (diff) | |
Add --bt-load-saved-metadata option
Before getting torrent metadata from DHT when downloading with magnet
link, first try to read file saved by --bt-save-metadata option. If it
is successful, then skip downloading metadata from DHT. By default,
this feature is turned off.
Diffstat (limited to 'src/OptionHandlerFactory.cc')
| -rw-r--r-- | src/OptionHandlerFactory.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/OptionHandlerFactory.cc b/src/OptionHandlerFactory.cc index b1721c80..6f352cd4 100644 --- a/src/OptionHandlerFactory.cc +++ b/src/OptionHandlerFactory.cc @@ -1528,6 +1528,16 @@ std::vector<OptionHandler*> OptionHandlerFactory::createOptionHandlers() handlers.push_back(op); } { + OptionHandler* op(new BooleanOptionHandler( + PREF_BT_LOAD_SAVED_METADATA, TEXT_BT_LOAD_SAVED_METADATA, A2_V_FALSE, + OptionHandler::OPT_ARG)); + op->addTag(TAG_BITTORRENT); + op->setInitialOption(true); + op->setChangeGlobalOption(true); + op->setChangeOptionForReserved(true); + handlers.push_back(op); + } + { OptionHandler* op(new DefaultOptionHandler( PREF_BT_LPD_INTERFACE, TEXT_BT_LPD_INTERFACE, NO_DEFAULT_VALUE, "interface, IP address", OptionHandler::REQ_ARG)); |
