diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2009-12-20 09:49:43 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2009-12-20 09:49:43 +0000 |
| commit | 2952abf064b6c9042ee16e0122b6dc85b6e3e8f7 (patch) | |
| tree | e3fc639cec5760e7985ebce08bac3cbdbe4f9a62 /src/UTMetadataPostDownloadHandler.cc | |
| parent | 7c12d43a42f47635f581a0a1514bdbabbc876c17 (diff) | |
2009-12-20 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added following 2 keys, followedBy and belongsTo, to the response
of tellStatus.
followedBy: List of GIDs which are generated by the consequence of
this download. For example, when aria2 downloaded Metalink file,
it generates downloads described in it(see *--follow-metalink*
option). This value is useful to track these auto generated
downloads. If there is no such downloads, this key will not be
included in the response.
belongsTo: GID of a parent download. Some downloads are a part of
another download. For example, if a file in Metalink has
BitTorrent resource, the download of .torrent is a part of that
file. If this download has no parent, this key will not be
included in the response.
* src/BtPostDownloadHandler.cc
* src/DownloadResult.h
* src/Metalink2RequestGroup.cc
* src/MetalinkPostDownloadHandler.cc
* src/RequestGroup.cc
* src/RequestGroup.h
* src/UTMetadataPostDownloadHandler.cc
* src/XmlRpcMethodImpl.cc
* src/XmlRpcMethodImpl.h
Diffstat (limited to 'src/UTMetadataPostDownloadHandler.cc')
| -rw-r--r-- | src/UTMetadataPostDownloadHandler.cc | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/UTMetadataPostDownloadHandler.cc b/src/UTMetadataPostDownloadHandler.cc index 12e0f9dc..024960c5 100644 --- a/src/UTMetadataPostDownloadHandler.cc +++ b/src/UTMetadataPostDownloadHandler.cc @@ -76,14 +76,12 @@ void UTMetadataPostDownloadHandler::getNextRequestGroups std::string metadata = util::toString(requestGroup->getPieceStorage()->getDiskAdaptor()); std::string torrent = bittorrent::metadata2Torrent(metadata, attrs); - try { - std::deque<SharedHandle<RequestGroup> > newRgs; - createRequestGroupForBitTorrent(newRgs, requestGroup->getOption(), - std::deque<std::string>(), torrent); - groups.insert(groups.end(), newRgs.begin(), newRgs.end()); - } catch(RecoverableException& e) { - _logger->error("Failed to parse BitTorrent metadata.", e); - } + + std::deque<SharedHandle<RequestGroup> > newRgs; + createRequestGroupForBitTorrent(newRgs, requestGroup->getOption(), + std::deque<std::string>(), torrent); + requestGroup->followedBy(newRgs.begin(), newRgs.end()); + groups.insert(groups.end(), newRgs.begin(), newRgs.end()); } } // namespace aria2 |
