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'] = []; }