Implement Peer ID Client column for Peers tab

PR #17940.
This commit is contained in:
Hanabishi
2022-11-06 09:21:31 +05:00
committed by sledgehammer999
parent d829df99aa
commit 2bdc91c53f
7 changed files with 46 additions and 5 deletions

View File

@@ -66,6 +66,7 @@ namespace
// Peer keys
const QString KEY_PEER_CLIENT = u"client"_qs;
const QString KEY_PEER_ID_CLIENT = u"peer_id_client"_qs;
const QString KEY_PEER_CONNECTION_TYPE = u"connection"_qs;
const QString KEY_PEER_COUNTRY = u"country"_qs;
const QString KEY_PEER_COUNTRY_CODE = u"country_code"_qs;
@@ -561,6 +562,7 @@ void SyncController::torrentPeersAction()
{KEY_PEER_IP, pi.address().ip.toString()},
{KEY_PEER_PORT, pi.address().port},
{KEY_PEER_CLIENT, pi.client()},
{KEY_PEER_ID_CLIENT, pi.peerIdClient()},
{KEY_PEER_PROGRESS, pi.progress()},
{KEY_PEER_DOWN_SPEED, pi.payloadDownSpeed()},
{KEY_PEER_UP_SPEED, pi.payloadUpSpeed()},

View File

@@ -52,7 +52,7 @@
#include "base/utils/version.h"
#include "api/isessionmanager.h"
inline const Utils::Version<3, 2> API_VERSION {2, 8, 16};
inline const Utils::Version<3, 2> API_VERSION {2, 8, 17};
class APIController;
class AuthController;

View File

@@ -1498,6 +1498,7 @@ window.qBittorrent.DynamicTable = (function() {
this.newColumn('connection', '', 'QBT_TR(Connection)QBT_TR[CONTEXT=PeerListWidget]', 50, true);
this.newColumn('flags', '', 'QBT_TR(Flags)QBT_TR[CONTEXT=PeerListWidget]', 50, true);
this.newColumn('client', '', 'QBT_TR(Client)QBT_TR[CONTEXT=PeerListWidget]', 140, true);
this.newColumn('peer_id_client', '', 'QBT_TR(Peer ID Client)QBT_TR[CONTEXT=PeerListWidget]', 60, false);
this.newColumn('progress', '', 'QBT_TR(Progress)QBT_TR[CONTEXT=PeerListWidget]', 50, true);
this.newColumn('dl_speed', '', 'QBT_TR(Down Speed)QBT_TR[CONTEXT=PeerListWidget]', 50, true);
this.newColumn('up_speed', '', 'QBT_TR(Up Speed)QBT_TR[CONTEXT=PeerListWidget]', 50, true);