mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-15 01:33:07 -07:00
- Display in tracker list the number of peers gotten from LSD/PeX/DHT
This commit is contained in:
parent
3827a66a3a
commit
480d1b18db
4 changed files with 48 additions and 16 deletions
|
@ -966,6 +966,10 @@ bool Bittorrent::isDHTEnabled() const{
|
|||
return DHTEnabled;
|
||||
}
|
||||
|
||||
bool Bittorrent::isLSDEnabled() const{
|
||||
return LSDEnabled;
|
||||
}
|
||||
|
||||
void Bittorrent::enableUPnP(bool b) {
|
||||
if(b) {
|
||||
if(!UPnPEnabled) {
|
||||
|
@ -1537,16 +1541,6 @@ void Bittorrent::readAlerts() {
|
|||
trackersInfos[h.hash()] = trackers_data;
|
||||
qDebug("Received a tracker warning from %s: %s", p->url.c_str(), p->msg.c_str());
|
||||
}
|
||||
} else if (dht_reply_alert* p = dynamic_cast<dht_reply_alert*>(a.get())) {
|
||||
QTorrentHandle h(p->handle);
|
||||
if(h.is_valid()){
|
||||
// Connection was successful now but there is a warning message
|
||||
QHash<QString, TrackerInfos> trackers_data = trackersInfos.value(h.hash(), QHash<QString, TrackerInfos>());
|
||||
TrackerInfos data = trackers_data.value("dht", TrackerInfos("dht"));
|
||||
data.num_peers = p->num_peers;
|
||||
trackers_data.insert("dht", data);
|
||||
trackersInfos[h.hash()] = trackers_data;
|
||||
}
|
||||
}
|
||||
else if (portmap_error_alert* p = dynamic_cast<portmap_error_alert*>(a.get())) {
|
||||
addConsoleMessage(tr("UPnP/NAT-PMP: Port mapping failure, message: %1").arg(QString(p->message().c_str())), QColor("red"));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue