Browse Source

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.
adaptive-webui-19844
Chocobo1 2 years ago
parent
commit
56bb379024
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
  1. 6
      src/base/bittorrent/torrentimpl.cpp

6
src/base/bittorrent/torrentimpl.cpp

@ -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

Loading…
Cancel
Save