mirror of https://github.com/kiwix/libkiwix.git
update download's status when we get it
This commit is contained in:
parent
8698407e1e
commit
12ffad55f7
|
@ -139,11 +139,13 @@ Download* Downloader::startDownload(const std::string& uri)
|
||||||
Download* Downloader::getDownload(const std::string& did)
|
Download* Downloader::getDownload(const std::string& did)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
|
m_knownDownloads.at(did).get()->updateStatus(true);
|
||||||
return m_knownDownloads.at(did).get();
|
return m_knownDownloads.at(did).get();
|
||||||
} catch(exception& e) {
|
} catch(exception& e) {
|
||||||
for (auto gid : mp_aria->tellActive()) {
|
for (auto gid : mp_aria->tellActive()) {
|
||||||
if (gid == did) {
|
if (gid == did) {
|
||||||
m_knownDownloads[gid] = std::unique_ptr<Download>(new Download(mp_aria, gid));
|
m_knownDownloads[gid] = std::unique_ptr<Download>(new Download(mp_aria, gid));
|
||||||
|
m_knownDownloads.at(gid).get()->updateStatus(true);
|
||||||
return m_knownDownloads[gid].get();
|
return m_knownDownloads[gid].get();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue