diff --git a/utils/drmprocessorclientimpl.cpp b/utils/drmprocessorclientimpl.cpp index 58a9f97..561e6ad 100644 --- a/utils/drmprocessorclientimpl.cpp +++ b/utils/drmprocessorclientimpl.cpp @@ -138,11 +138,13 @@ static int downloadProgress(void *clientp, curl_off_t dltotal, curl_off_t dlnow, // For "big" files only if (dltotal >= DISPLAY_THRESHOLD && gourou::logLevel >= gourou::LG_LOG_WARN) { + static int last_percent=-1; int percent = 0; if (dltotal) percent = (dlnow * 100) / dltotal; - - std::cout << "\rDownload " << percent << "%" << std::flush; + if(last_percent!=percent) + std::cout << "\rDownload " << percent << "%" << std::flush; + last_percent=percent; } return 0;