mirror of
https://github.com/torrentpier/torrentpier-lts.git
synced 2025-02-28 15:10:54 +03:00
Improve code for retracker addition (#333)
Co-authored-by: Cønstantine Kovalensky <45331093+kovalensky@users.noreply.github.com>
This commit is contained in:
parent
f0e65b0e57
commit
17736a7d5d
@ -512,22 +512,11 @@ function send_torrent_with_passkey ($filename)
|
||||
}
|
||||
|
||||
// Add retracker
|
||||
if (isset($tr_cfg['retracker']) && $tr_cfg['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'] = array(
|
||||
array($announce),
|
||||
$announce_urls_add,
|
||||
array($tr_cfg['retracker_host'])
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
$tor['announce-list'] = array_merge($tor['announce-list'], array(array($tr_cfg['retracker_host'])));
|
||||
}
|
||||
$tor['announce-list'] = array_merge((isset($tor['announce-list']) ? $tor['announce-list'] : array()), [$bb_cfg['tracker']['retracker_host']]);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user