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.completedLength = dh->getCompletedLength();
|
||||||
st.downloadSpeed = dh->getDownloadSpeed();
|
st.downloadSpeed = dh->getDownloadSpeed();
|
||||||
st.uploadSpeed = dh->getUploadSpeed();
|
st.uploadSpeed = dh->getUploadSpeed();
|
||||||
std::vector<aria2::FileData> files = dh->getFiles();
|
if(dh->getNumFiles() > 0) {
|
||||||
if(!files.empty()) {
|
aria2::FileData file = dh->getFile(1);
|
||||||
st.filename = files[0].path;
|
st.filename = file.path;
|
||||||
}
|
}
|
||||||
v.push_back(std::move(st));
|
v.push_back(std::move(st));
|
||||||
aria2::deleteDownloadHandle(dh);
|
aria2::deleteDownloadHandle(dh);
|
||||||
|
|
Loading…
Reference in New Issue