mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-24 10:16:00 +03:00
Fix DHT/PeX/LSD status when it is globally disabled
Global status takes precedence over specific torrent private status. PR #17126.
This commit is contained in:
parent
9cd993d1da
commit
5173a56ebd
1 changed files with 9 additions and 9 deletions
|
@ -279,26 +279,26 @@ void TrackerListWidget::loadStickyItems(const BitTorrent::Torrent *torrent)
|
||||||
const auto *session = BitTorrent::Session::instance();
|
const auto *session = BitTorrent::Session::instance();
|
||||||
|
|
||||||
// load DHT information
|
// load DHT information
|
||||||
if (torrent->isPrivate() || torrent->isDHTDisabled())
|
if (!session->isDHTEnabled())
|
||||||
m_DHTItem->setText(COL_STATUS, torrentDisabled);
|
|
||||||
else if (!session->isDHTEnabled())
|
|
||||||
m_DHTItem->setText(COL_STATUS, disabled);
|
m_DHTItem->setText(COL_STATUS, disabled);
|
||||||
|
else if (torrent->isPrivate() || torrent->isDHTDisabled())
|
||||||
|
m_DHTItem->setText(COL_STATUS, torrentDisabled);
|
||||||
else
|
else
|
||||||
m_DHTItem->setText(COL_STATUS, working);
|
m_DHTItem->setText(COL_STATUS, working);
|
||||||
|
|
||||||
// Load PeX Information
|
// Load PeX Information
|
||||||
if (torrent->isPrivate() || torrent->isPEXDisabled())
|
if (!session->isPeXEnabled())
|
||||||
m_PEXItem->setText(COL_STATUS, torrentDisabled);
|
|
||||||
else if (!session->isPeXEnabled())
|
|
||||||
m_PEXItem->setText(COL_STATUS, disabled);
|
m_PEXItem->setText(COL_STATUS, disabled);
|
||||||
|
else if (torrent->isPrivate() || torrent->isPEXDisabled())
|
||||||
|
m_PEXItem->setText(COL_STATUS, torrentDisabled);
|
||||||
else
|
else
|
||||||
m_PEXItem->setText(COL_STATUS, working);
|
m_PEXItem->setText(COL_STATUS, working);
|
||||||
|
|
||||||
// Load LSD Information
|
// Load LSD Information
|
||||||
if (torrent->isPrivate() || torrent->isLSDDisabled())
|
if (!session->isLSDEnabled())
|
||||||
m_LSDItem->setText(COL_STATUS, torrentDisabled);
|
|
||||||
else if (!session->isLSDEnabled())
|
|
||||||
m_LSDItem->setText(COL_STATUS, disabled);
|
m_LSDItem->setText(COL_STATUS, disabled);
|
||||||
|
else if (torrent->isPrivate() || torrent->isLSDDisabled())
|
||||||
|
m_LSDItem->setText(COL_STATUS, torrentDisabled);
|
||||||
else
|
else
|
||||||
m_LSDItem->setText(COL_STATUS, working);
|
m_LSDItem->setText(COL_STATUS, working);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue