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)
|
||||
{
|
||||
try {
|
||||
m_knownDownloads.at(did).get()->updateStatus(true);
|
||||
return m_knownDownloads.at(did).get();
|
||||
} catch(exception& e) {
|
||||
for (auto gid : mp_aria->tellActive()) {
|
||||
if (gid == did) {
|
||||
m_knownDownloads[gid] = std::unique_ptr<Download>(new Download(mp_aria, gid));
|
||||
m_knownDownloads.at(gid).get()->updateStatus(true);
|
||||
return m_knownDownloads[gid].get();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue