summaryrefslogtreecommitdiff
path: root/src/RequestGroup.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2016-02-03 22:19:28 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2016-02-03 22:21:37 +0900
commit25615fcb1744e94f4774aaee24ed4db172af397f (patch)
tree57208721c3891951745ce543a9c83f4bfe2ce748 /src/RequestGroup.cc
parentdbcf07fd11b9b29494787dd54fb29c5644798ec3 (diff)
Add "seeder" key to tellStatus RPC response
Diffstat (limited to 'src/RequestGroup.cc')
-rw-r--r--src/RequestGroup.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/RequestGroup.cc b/src/RequestGroup.cc
index a1f7080d..0098acc4 100644
--- a/src/RequestGroup.cc
+++ b/src/RequestGroup.cc
@@ -1264,4 +1264,10 @@ void RequestGroup::enableSeedOnly()
}
}
+bool RequestGroup::isSeeder() const {
+ return downloadContext_->hasAttribute(CTX_ATTR_BT) &&
+ !bittorrent::getTorrentAttrs(downloadContext_)->metadata.empty() &&
+ downloadFinished();
+}
+
} // namespace aria2