From 789b5866bbed98fb0e635a11541916f488a3cf78 Mon Sep 17 00:00:00 2001 From: Roman Kelesidis Date: Mon, 6 Jan 2025 19:01:31 +0700 Subject: [PATCH] Update Torrent.php --- src/Legacy/Torrent.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Legacy/Torrent.php b/src/Legacy/Torrent.php index 00a37188e..139bbdd45 100644 --- a/src/Legacy/Torrent.php +++ b/src/Legacy/Torrent.php @@ -398,8 +398,12 @@ class Torrent // Getting external peers if ($bb_cfg['tracker']['multitracker']['enabled']) { - $tor['announce-list'] = array_merge(array_column($tor['announce-list'], 0), [$tor['announce']]); + // Getting / preparing announcers list + array_unshift($tor['announce-list'], [$tor['announce']]); + $tor['announce-list'] = array_column($tor['announce-list'], 0); $announcers = array_unique($tor['announce-list'], SORT_REGULAR); + + // Getting external seeders / leechers $multiTracker = new MultiTracker([ bin2hex($info_hash ?? $info_hash_v2) ], $announcers);