From 0f091eb546e34923d9d1ab34be5faf92080ec198 Mon Sep 17 00:00:00 2001 From: Roman Kelesidis Date: Thu, 16 Jan 2025 17:49:33 +0300 Subject: [PATCH] fix: Incorrect peer country flag (#1768) --- library/attach_mod/displaying_torrent.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/attach_mod/displaying_torrent.php b/library/attach_mod/displaying_torrent.php index 9dddcb73b..604c5bf2e 100644 --- a/library/attach_mod/displaying_torrent.php +++ b/library/attach_mod/displaying_torrent.php @@ -456,7 +456,7 @@ if ($tor_reged && $tor_info) { 'ROW_BGR' => $row_bgr, 'NAME' => ($peer['update_time']) ? $name : "$name", 'PEER_ID' => isset($peer['peer_id']) ? get_user_torrent_client($peer['peer_id']) : $lang['UNKNOWN'], - 'COUNTRY' => render_flag(infoByIP($ip, $port)['countryCode'], false), + 'COUNTRY' => render_flag(infoByIP((!empty($peer['ipv6']) ? $peer['ipv6'] : $peer['ip']), $peer['port'])['countryCode'], false), 'COMPL_PRC' => $compl_perc, 'UP_TOTAL' => ($max_up_id[$x] == $pid) ? "$up_tot" : $up_tot, 'DOWN_TOTAL' => ($max_down_id[$x] == $pid) ? "$down_tot" : $down_tot,