mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-25 15:45:33 -07:00
Update Torrent.php
This commit is contained in:
parent
8767e8156f
commit
76fcbfed91
1 changed files with 10 additions and 0 deletions
|
@ -9,6 +9,7 @@
|
|||
|
||||
namespace TorrentPier\Legacy;
|
||||
|
||||
use TorrentPier\MultiTracker;
|
||||
use TorrentPier\TorrServerAPI;
|
||||
|
||||
use Arokettu\Bencode\Bencode;
|
||||
|
@ -395,6 +396,15 @@ class Torrent
|
|||
}
|
||||
}
|
||||
|
||||
// Getting multi-peers
|
||||
if ($bb_cfg['tracker']['multitracker']['enabled']) {
|
||||
$torrent = \Arokettu\Torrent\TorrentFile::loadFromString($file_contents);
|
||||
$announcers = $torrent->getAnnounceList()->toArray();
|
||||
$multiTracker = new MultiTracker([
|
||||
bin2hex($info_hash ?? $info_hash_v2)
|
||||
], $announcers[0]);
|
||||
}
|
||||
|
||||
if ($row = DB()->fetch_row("SELECT topic_id FROM " . BB_BT_TORRENTS . " $info_hash_where LIMIT 1")) {
|
||||
$msg = sprintf($lang['BT_REG_FAIL_SAME_HASH'], TOPIC_URL . $row['topic_id']);
|
||||
bb_die($msg);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue