Skip to content

Commit

Permalink
fixup! Get Waiting downloads before Active ones.
Browse files Browse the repository at this point in the history
  • Loading branch information
mgautierfr committed Feb 8, 2023
1 parent 4c08724 commit 4903f79
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/downloader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,10 @@ Downloader::Downloader() :
}
try {
for (auto gid : mp_aria->tellActive()) {
m_knownDownloads[gid] = std::unique_ptr<Download>(new Download(mp_aria, gid));
m_knownDownloads[gid]->updateStatus(false);
if( m_knownDownloads.find(gid) == m_knownDownloads.end()) {
m_knownDownloads[gid] = std::unique_ptr<Download>(new Download(mp_aria, gid));
m_knownDownloads[gid]->updateStatus(false);
}
}
} catch (std::exception& e) {
std::cerr << "aria2 tellActive failed : " << e.what() << std::endl;
Expand Down

0 comments on commit 4903f79

Please sign in to comment.