diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2013-05-09 00:49:16 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2013-05-09 00:49:16 +0900 |
| commit | e4996e563bf542eb900d5892d2d9cae15bd2c16f (patch) | |
| tree | 74baba45fb32c014455efa24be1c604afe46e3c4 | |
| parent | b733431ac4d378c66d13eb590a771504bcb290dc (diff) | |
Use getFile(index) API
| -rw-r--r-- | examples/libaria2wx.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/libaria2wx.cc b/examples/libaria2wx.cc index 45f14b92..9e905a9c 100644 --- a/examples/libaria2wx.cc +++ b/examples/libaria2wx.cc @@ -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); |
