summaryrefslogtreecommitdiff
path: root/src/BtPostDownloadHandler.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2009-12-20 09:49:43 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2009-12-20 09:49:43 +0000
commit2952abf064b6c9042ee16e0122b6dc85b6e3e8f7 (patch)
treee3fc639cec5760e7985ebce08bac3cbdbe4f9a62 /src/BtPostDownloadHandler.cc
parent7c12d43a42f47635f581a0a1514bdbabbc876c17 (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/BtPostDownloadHandler.cc')
-rw-r--r--src/BtPostDownloadHandler.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/BtPostDownloadHandler.cc b/src/BtPostDownloadHandler.cc
index 62d56413..87d1db32 100644
--- a/src/BtPostDownloadHandler.cc
+++ b/src/BtPostDownloadHandler.cc
@@ -77,9 +77,12 @@ void BtPostDownloadHandler::getNextRequestGroups
requestGroup->getPieceStorage()->getDiskAdaptor()->closeFile();
throw;
}
- createRequestGroupForBitTorrent(groups, requestGroup->getOption(),
+ std::deque<SharedHandle<RequestGroup> > newRgs;
+ createRequestGroupForBitTorrent(newRgs, requestGroup->getOption(),
std::deque<std::string>(),
content);
+ requestGroup->followedBy(newRgs.begin(), newRgs.end());
+ groups.insert(groups.end(), newRgs.begin(), newRgs.end());
}
} // namespace aria2