mirror of
https://github.com/torrentpier/torrentpier-lts.git
synced 2025-02-28 15:10:54 +03:00
Fixed announcer-list issue (#336)
* Fixed announcer-list issue * Update CHANGELOG.md
This commit is contained in:
parent
f5f3733894
commit
8d21c37608
@ -6,7 +6,7 @@
|
||||
**Merged pull requests:**
|
||||
|
||||
- Release v2.1.5-2024.05-beta1 🎉
|
||||
- Fixed announcer-list issue [\#335](https://github.com/torrentpier/torrentpier-lts/pull/335) ([belomaxorka](https://github.com/belomaxorka))
|
||||
- Fixed announcer-list issue [\#335](https://github.com/torrentpier/torrentpier-lts/pull/335), [\#336](https://github.com/torrentpier/torrentpier-lts/pull/336) ([belomaxorka](https://github.com/belomaxorka))
|
||||
- Some other changes / improvements
|
||||
|
||||
## [v2.1.5-2024.05-alpha5 [Final v2]](https://github.com/torrentpier/torrentpier-lts/tree/v2.1.5-2024.05-alpha5) (2024-06-04)
|
||||
|
@ -492,14 +492,8 @@ function send_torrent_with_passkey ($filename)
|
||||
$tor['announce'] = $announce;
|
||||
}
|
||||
|
||||
// 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'] = array();
|
||||
}
|
||||
@ -515,18 +509,6 @@ function send_torrent_with_passkey ($filename)
|
||||
}
|
||||
unset($additional_announce_urls);
|
||||
|
||||
// Adding tracker announcer to announce-list
|
||||
if ($bb_cfg['bt_replace_ann_url'])
|
||||
{
|
||||
// Adding tracker announcer as main announcer (At start)
|
||||
array_unshift($tor['announce-list'], array($announce));
|
||||
}
|
||||
else
|
||||
{
|
||||
// Adding tracker announcer (At end)
|
||||
$tor['announce-list'] = array_merge($tor['announce-list'], array(array($announce)));
|
||||
}
|
||||
|
||||
// Adding additional announce urls (If present)
|
||||
if (!empty($announce_urls_add))
|
||||
{
|
||||
@ -542,6 +524,33 @@ function send_torrent_with_passkey ($filename)
|
||||
}
|
||||
}
|
||||
|
||||
// Adding tracker announcer to announce-list
|
||||
if (!empty($tor['announce-list']))
|
||||
{
|
||||
if ($bb_cfg['bt_replace_ann_url'])
|
||||
{
|
||||
// Adding tracker announcer as main announcer (At start)
|
||||
array_unshift($tor['announce-list'], array($announce));
|
||||
}
|
||||
else
|
||||
{
|
||||
// Adding torrent announcer (At start)
|
||||
array_unshift($tor['announce-list'], array($tor['announce']));
|
||||
|
||||
// Adding tracker announcer (At end)
|
||||
if ($tor['announce'] != $announce)
|
||||
{
|
||||
$tor['announce-list'] = array_merge($tor['announce-list'], array(array($announce)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Remove announce-list if empty
|
||||
if (empty($tor['announce-list']))
|
||||
{
|
||||
unset($tor['announce-list']);
|
||||
}
|
||||
|
||||
// Add publisher & topic url
|
||||
$publisher_name = $bb_cfg['server_name'];
|
||||
$publisher_url = make_url(TOPIC_URL . $topic_id);
|
||||
|
Loading…
Reference in New Issue
Block a user