1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-02-05 11:24:15 +00:00

Add workaround for payload upload/download rate

The graphs are showing 0 for both payload upload & download rate but
torrent statistics aren't, so suppress it manually.
The workaround only applies to paused state for now.

Closes #17294.
This commit is contained in:
Chocobo1 2022-07-14 16:54:28 +08:00
parent bafe4e909c
commit 56bb379024
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C

View File

@ -1329,12 +1329,14 @@ qreal TorrentImpl::realRatio() const
int TorrentImpl::uploadPayloadRate() const int TorrentImpl::uploadPayloadRate() const
{ {
return m_nativeStatus.upload_payload_rate; // workaround: suppress the speed for paused state
return isPaused() ? 0 : m_nativeStatus.upload_payload_rate;
} }
int TorrentImpl::downloadPayloadRate() const int TorrentImpl::downloadPayloadRate() const
{ {
return m_nativeStatus.download_payload_rate; // workaround: suppress the speed for paused state
return isPaused() ? 0 : m_nativeStatus.download_payload_rate;
} }
qlonglong TorrentImpl::totalPayloadUpload() const qlonglong TorrentImpl::totalPayloadUpload() const