mirror of https://github.com/aria2/aria2
Use getFile(index) API
parent
b733431ac4
commit
e4996e563b
|
@ -432,9 +432,9 @@ int downloaderJob(JobQueue& jobq, NotifyQueue& notifyq)
|
|||
st.completedLength = dh->getCompletedLength();
|
||||
st.downloadSpeed = dh->getDownloadSpeed();
|
||||
st.uploadSpeed = dh->getUploadSpeed();
|
||||
std::vector<aria2::FileData> files = dh->getFiles();
|
||||
if(!files.empty()) {
|
||||
st.filename = files[0].path;
|
||||
if(dh->getNumFiles() > 0) {
|
||||
aria2::FileData file = dh->getFile(1);
|
||||
st.filename = file.path;
|
||||
}
|
||||
v.push_back(std::move(st));
|
||||
aria2::deleteDownloadHandle(dh);
|
||||
|
|
Loading…
Reference in New Issue