diff --git a/src/MultiUrlRequestInfo.cc b/src/MultiUrlRequestInfo.cc index 3ba739f6..66461d8d 100644 --- a/src/MultiUrlRequestInfo.cc +++ b/src/MultiUrlRequestInfo.cc @@ -315,7 +315,8 @@ error_code::Value MultiUrlRequestInfo::getResult() if (!serverStatOf.empty()) { e_->getRequestGroupMan()->saveServerStat(serverStatOf); } - if (!option_->getAsBool(PREF_QUIET)) { + if (!option_->getAsBool(PREF_QUIET) && + option_->get(PREF_DOWNLOAD_RESULT) != A2_V_HIDE) { e_->getRequestGroupMan()->showDownloadResults( *global::cout(), option_->get(PREF_DOWNLOAD_RESULT) == A2_V_FULL); global::cout()->flush(); diff --git a/src/OptionHandlerFactory.cc b/src/OptionHandlerFactory.cc index 89231cd6..fa467c25 100644 --- a/src/OptionHandlerFactory.cc +++ b/src/OptionHandlerFactory.cc @@ -235,9 +235,9 @@ std::vector OptionHandlerFactory::createOptionHandlers() handlers.push_back(op); } { - OptionHandler* op( - new ParameterOptionHandler(PREF_DOWNLOAD_RESULT, TEXT_DOWNLOAD_RESULT, - A2_V_DEFAULT, {A2_V_DEFAULT, A2_V_FULL})); + OptionHandler* op(new ParameterOptionHandler( + PREF_DOWNLOAD_RESULT, TEXT_DOWNLOAD_RESULT, A2_V_DEFAULT, + {A2_V_DEFAULT, A2_V_FULL, A2_V_HIDE})); op->addTag(TAG_ADVANCED); op->setChangeGlobalOption(true); handlers.push_back(op); diff --git a/src/prefs.cc b/src/prefs.cc index 10530734..e3b439eb 100644 --- a/src/prefs.cc +++ b/src/prefs.cc @@ -121,6 +121,7 @@ const std::string V_NONE("none"); const std::string V_MEM("mem"); const std::string V_ALL("all"); const std::string A2_V_FULL("full"); +const std::string A2_V_HIDE("hide"); const std::string A2_V_GEOM("geom"); const std::string V_PREALLOC("prealloc"); const std::string V_FALLOC("falloc"); @@ -336,7 +337,7 @@ PrefPtr PREF_STREAM_PIECE_SELECTOR = makePref("stream-piece-selector"); PrefPtr PREF_TRUNCATE_CONSOLE_READOUT = makePref("truncate-console-readout"); // value: true | false PrefPtr PREF_PAUSE = makePref("pause"); -// value: default | full +// value: default | full | hide PrefPtr PREF_DOWNLOAD_RESULT = makePref("download-result"); // value: true | false PrefPtr PREF_HASH_CHECK_ONLY = makePref("hash-check-only"); diff --git a/src/prefs.h b/src/prefs.h index c635def8..d85fb6bb 100644 --- a/src/prefs.h +++ b/src/prefs.h @@ -78,6 +78,7 @@ extern const std::string V_NONE; extern const std::string V_MEM; extern const std::string V_ALL; extern const std::string A2_V_FULL; +extern const std::string A2_V_HIDE; extern const std::string A2_V_GEOM; extern const std::string V_PREALLOC; extern const std::string V_FALLOC; @@ -289,7 +290,7 @@ extern PrefPtr PREF_STREAM_PIECE_SELECTOR; extern PrefPtr PREF_TRUNCATE_CONSOLE_READOUT; // value: true | false extern PrefPtr PREF_PAUSE; -// value: default | full +// value: default | full | hide extern PrefPtr PREF_DOWNLOAD_RESULT; // value: true | false extern PrefPtr PREF_HASH_CHECK_ONLY; diff --git a/src/usage_text.h b/src/usage_text.h index 22ddc218..808ff001 100644 --- a/src/usage_text.h +++ b/src/usage_text.h @@ -882,7 +882,8 @@ " download speed, percentage of progress and\n" \ " path/URI. The percentage of progress and\n" \ " path/URI are printed for each requested file in\n" \ - " each row.") + " each row.\n" \ + " If OPT is 'hide', \"Download Result\" is hidden.") #define TEXT_HASH_CHECK_ONLY \ _(" --hash-check-only[=true|false] If true is given, after hash check using\n" \ " --check-integrity option, abort download whether\n" \