mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 22:03:49 -07:00
Removed one-time used variables (#1120)
This commit is contained in:
parent
f18e80d8ca
commit
edec548219
1 changed files with 2 additions and 6 deletions
|
@ -541,19 +541,15 @@ class Torrent
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Announce URL
|
// Torrent decoding
|
||||||
$ann_url = $bb_cfg['bt_announce_url'];
|
|
||||||
|
|
||||||
$file_contents = file_get_contents($filename);
|
$file_contents = file_get_contents($filename);
|
||||||
if (!$tor = \Arokettu\Bencode\Bencode::decode($file_contents, dictType: \Arokettu\Bencode\Bencode\Collection::ARRAY)) {
|
if (!$tor = \Arokettu\Bencode\Bencode::decode($file_contents, dictType: \Arokettu\Bencode\Bencode\Collection::ARRAY)) {
|
||||||
bb_die($lang['TORFILE_INVALID']);
|
bb_die($lang['TORFILE_INVALID']);
|
||||||
}
|
}
|
||||||
|
|
||||||
$announce = $bb_cfg['ocelot']['enabled'] ? (string)($bb_cfg['ocelot']['url'] . $passkey_val . "/announce") : (string)($ann_url . "?$passkey_key=$passkey_val");
|
|
||||||
|
|
||||||
// Replace original announce url with tracker default
|
// Replace original announce url with tracker default
|
||||||
if ($bb_cfg['bt_replace_ann_url'] || !isset($tor['announce'])) {
|
if ($bb_cfg['bt_replace_ann_url'] || !isset($tor['announce'])) {
|
||||||
$tor['announce'] = $announce;
|
$tor['announce'] = $bb_cfg['ocelot']['enabled'] ? $bb_cfg['ocelot']['url'] . "$passkey_val/announce" : $bb_cfg['bt_announce_url'] . "?$passkey_key=$passkey_val";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get additional announce urls
|
// Get additional announce urls
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue