diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2016-02-03 22:19:28 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2016-02-03 22:21:37 +0900 |
| commit | 25615fcb1744e94f4774aaee24ed4db172af397f (patch) | |
| tree | 57208721c3891951745ce543a9c83f4bfe2ce748 /src/RequestGroup.cc | |
| parent | dbcf07fd11b9b29494787dd54fb29c5644798ec3 (diff) | |
Add "seeder" key to tellStatus RPC response
Diffstat (limited to 'src/RequestGroup.cc')
| -rw-r--r-- | src/RequestGroup.cc | 6 |
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 |
