mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-01 21:28:07 -06:00
Implement new GeoIPManager class.
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
|
||||
#include <libtorrent/version.hpp>
|
||||
|
||||
#include "core/net/geoipmanager.h"
|
||||
#include "core/utils/string.h"
|
||||
#include "peerinfo.h"
|
||||
|
||||
@@ -69,11 +70,12 @@ bool PeerInfo::fromLSD() const
|
||||
return (m_nativeInfo.source & libt::peer_info::lsd);
|
||||
}
|
||||
|
||||
#ifndef DISABLE_COUNTRIES_RESOLUTION
|
||||
QString PeerInfo::country() const
|
||||
{
|
||||
return QString(QByteArray(m_nativeInfo.country, 2));
|
||||
return Net::GeoIPManager::instance()->lookup(address().ip);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
bool PeerInfo::isInteresting() const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user