diff --git a/include/downloader.h b/include/downloader.h index b27a5415..f385823c 100644 --- a/include/downloader.h +++ b/include/downloader.h @@ -71,14 +71,15 @@ class Download { * - A first one to download the metadlink. * - A second one to download the real file. * - * By default, `Download` track only the first download. So status may appear - * as COMPLETE even if the real file downloading is still running. - * By passing true to follow, `Dowload` will detect that and will track the - * second download instead. + * If `follow` is true, updateStatus tries to detect that and tracks + * the second download when the first one is finished. + * By passing false to `follow`, `Download` will only track the first download. * * `getFoo` methods are based on the last statusUpdate. + * + * @param follow: Do we have to follow following downloads. */ - void updateStatus(bool follow=false); + void updateStatus(bool follow); /** * Pause the download (and call updateStatus) diff --git a/src/downloader.cpp b/src/downloader.cpp index 1163f69d..2035cecf 100644 --- a/src/downloader.cpp +++ b/src/downloader.cpp @@ -130,7 +130,7 @@ Downloader::Downloader() : try { for (auto gid : mp_aria->tellActive()) { m_knownDownloads[gid] = std::unique_ptr(new Download(mp_aria, gid)); - m_knownDownloads[gid]->updateStatus(); + m_knownDownloads[gid]->updateStatus(false); } } catch (std::exception& e) { std::cerr << "aria2 tellActive failed : " << e.what() << std::endl; @@ -138,7 +138,7 @@ Downloader::Downloader() : try { for (auto gid : mp_aria->tellWaiting()) { m_knownDownloads[gid] = std::unique_ptr(new Download(mp_aria, gid)); - m_knownDownloads[gid]->updateStatus(); + m_knownDownloads[gid]->updateStatus(false); } } catch (std::exception& e) { std::cerr << "aria2 tellWaiting failed : " << e.what() << std::endl;