Fix compile error with --disable-bittorrent

pull/573/head
Tatsuhiro Tsujikawa 2016-02-15 23:54:51 +09:00
parent b5bab4097d
commit 8d30869966
1 changed files with 6 additions and 1 deletions

View File

@ -1264,10 +1264,15 @@ void RequestGroup::enableSeedOnly()
}
}
bool RequestGroup::isSeeder() const {
bool RequestGroup::isSeeder() const
{
#ifdef ENABLE_BITTORRENT
return downloadContext_->hasAttribute(CTX_ATTR_BT) &&
!bittorrent::getTorrentAttrs(downloadContext_)->metadata.empty() &&
downloadFinished();
#else // !ENABLE_BITTORRENT
return false;
#endif // !ENABLE_BITTORRENT
}
} // namespace aria2