From e1220c1846ebbd54bbdb9db1d7f928587ce26c87 Mon Sep 17 00:00:00 2001 From: Roman Kelesidis Date: Mon, 20 Nov 2023 00:47:54 +0700 Subject: [PATCH] Fixed announcer-list issue (#1132) * Fixed announcer-list issue * Update CHANGELOG.md --- CHANGELOG.md | 2 +- src/Legacy/Torrent.php | 9 ++------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c446dfd2..abfc1644d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ **Merged pull requests:** -- Fixed announcer-list issue [\#1129](https://github.com/torrentpier/torrentpier/pull/1129), [\#1130](https://github.com/torrentpier/torrentpier/pull/1130), [\#1131](https://github.com/torrentpier/torrentpier/pull/1131) ([belomaxorka](https://github.com/belomaxorka)) +- Fixed announcer-list issue [\#1129](https://github.com/torrentpier/torrentpier/pull/1129), [\#1130](https://github.com/torrentpier/torrentpier/pull/1130), [\#1131](https://github.com/torrentpier/torrentpier/pull/1131), [\#1132](https://github.com/torrentpier/torrentpier/pull/1132) ([belomaxorka](https://github.com/belomaxorka)) - Removed client column from bb_bt_tracker table [\#1128](https://github.com/torrentpier/torrentpier/pull/1128) ([belomaxorka](https://github.com/belomaxorka)) - Removed one-time used variables [\#1120](https://github.com/torrentpier/torrentpier/pull/1120) ([belomaxorka](https://github.com/belomaxorka)) - Don't create empty announce-list dict, if ann_urls are empty [\#1119](https://github.com/torrentpier/torrentpier/pull/1119) ([kovalensky](https://github.com/kovalensky)) diff --git a/src/Legacy/Torrent.php b/src/Legacy/Torrent.php index 0d20eb20f..45a3ee480 100644 --- a/src/Legacy/Torrent.php +++ b/src/Legacy/Torrent.php @@ -555,13 +555,8 @@ class Torrent $tor['announce'] = $announce_url; } - // Delete all additional urls - if ($bb_cfg['bt_del_addit_ann_urls'] || $bb_cfg['bt_disable_dht']) { - unset($tor['announce-list']); - } - - // Creating announce-list if not exist - if (!isset($tor['announce-list']) || !is_array($tor['announce-list'])) { + // Creating / cleaning announce-list + if (!isset($tor['announce-list']) || !is_array($tor['announce-list']) || $bb_cfg['bt_del_addit_ann_urls'] || $bb_cfg['bt_disable_dht']) { $tor['announce-list'] = []; }