Use getFile(index) API

pull/89/head
Tatsuhiro Tsujikawa 2013-05-09 00:49:16 +09:00
parent b733431ac4
commit e4996e563b
1 changed files with 3 additions and 3 deletions

View File

@ -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);