mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-11 15:27:54 +00:00
Add comments Thanks to Ian Kent for helping investigate
This commit is contained in:
parent
ecd49148d0
commit
72a6f7ae24
@ -915,26 +915,29 @@ int TorrentHandle::leechsCount() const
|
|||||||
|
|
||||||
int TorrentHandle::totalSeedsCount() const
|
int TorrentHandle::totalSeedsCount() const
|
||||||
{
|
{
|
||||||
return m_nativeStatus.list_seeds;
|
return (m_nativeStatus.num_complete > 0) ? m_nativeStatus.num_complete : m_nativeStatus.list_seeds;
|
||||||
}
|
}
|
||||||
|
|
||||||
int TorrentHandle::totalPeersCount() const
|
int TorrentHandle::totalPeersCount() const
|
||||||
{
|
{
|
||||||
return m_nativeStatus.list_peers;
|
int peers = m_nativeStatus.num_complete + m_nativeStatus.num_incomplete;
|
||||||
|
return (peers > 0) ? peers : m_nativeStatus.list_peers;
|
||||||
}
|
}
|
||||||
|
|
||||||
int TorrentHandle::totalLeechersCount() const
|
int TorrentHandle::totalLeechersCount() const
|
||||||
{
|
{
|
||||||
return (m_nativeStatus.list_peers - m_nativeStatus.list_seeds);
|
return (m_nativeStatus.num_incomplete > 0) ? m_nativeStatus.num_incomplete : (m_nativeStatus.list_peers - m_nativeStatus.list_seeds);
|
||||||
}
|
}
|
||||||
|
|
||||||
int TorrentHandle::completeCount() const
|
int TorrentHandle::completeCount() const
|
||||||
{
|
{
|
||||||
|
// additional info: https://github.com/qbittorrent/qBittorrent/pull/5300#issuecomment-267783646
|
||||||
return m_nativeStatus.num_complete;
|
return m_nativeStatus.num_complete;
|
||||||
}
|
}
|
||||||
|
|
||||||
int TorrentHandle::incompleteCount() const
|
int TorrentHandle::incompleteCount() const
|
||||||
{
|
{
|
||||||
|
// additional info: https://github.com/qbittorrent/qBittorrent/pull/5300#issuecomment-267783646
|
||||||
return m_nativeStatus.num_incomplete;
|
return m_nativeStatus.num_incomplete;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user