mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-22 14:23:57 -07:00
Improve code for retracker addition (#1118)
This commit is contained in:
parent
4a80f0e999
commit
787d4ae90b
1 changed files with 2 additions and 6 deletions
|
@ -573,13 +573,9 @@ class Torrent
|
|||
}
|
||||
|
||||
// Add retracker
|
||||
if (isset($bb_cfg['tracker']['retracker']) && $bb_cfg['tracker']['retracker']) {
|
||||
if (!empty($bb_cfg['tracker']['retracker_host']) && $bb_cfg['tracker']['retracker']) {
|
||||
if (bf($userdata['user_opt'], 'user_opt', 'user_retracker') || IS_GUEST) {
|
||||
if (!isset($tor['announce-list'])) {
|
||||
$tor['announce-list'] = [[$announce], $announce_urls_add, [$bb_cfg['tracker']['retracker_host']]];
|
||||
} else {
|
||||
$tor['announce-list'] = array_merge($tor['announce-list'], [[$bb_cfg['tracker']['retracker_host']]]);
|
||||
}
|
||||
$tor['announce-list'] = array_merge($tor['announce-list'] ?? [], [$bb_cfg['tracker']['retracker_host']]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue