|
@@ -581,7 +581,14 @@ $ShowGroups = !(!empty($LoggedUser['TorrentGrouping']) && $LoggedUser['TorrentGr
|
581
|
581
|
|
582
|
582
|
$SnatchedTorrentClass = $Data['IsSnatched'] ? ' snatched_torrent' : '';
|
583
|
583
|
$TorrentDL = "torrents.php?action=download&id=".$TorrentID."&authkey=".$LoggedUser['AuthKey']."&torrent_pass=".$LoggedUser['torrent_pass'];
|
584
|
|
- $TorrentMG = "magnet:?xt=urn:btih:".$Data['info_hash']."&as=https://".SITE_DOMAIN."/".str_replace('&','%26',$TorrentDL)."&tr=".implode("/".$LoggedUser['torrent_pass']."/announce&tr=",ANNOUNCE_URLS[0])."/".$LoggedUser['torrent_pass']."/announce&xl=".$Data['Size'];
|
|
584
|
+ if (!($TorrentFileName = $Cache->get_value('torrent_file_name_'.$TorrentID))) {
|
|
585
|
+ $DB->query("SELECT File FROM torrents_files WHERE TorrentID=".$TorrentID);
|
|
586
|
+ list($TorrentFile) = $DB->next_record(MYSQLI_NUM, false);
|
|
587
|
+ $Tor = new BencodeTorrent($TorrentFile);
|
|
588
|
+ $TorrentFileName = $Tor->Dec['info']['name'];
|
|
589
|
+ $Cache->cache_value('torrent_file_name_'.$TorrentID, $TorrentFileName);
|
|
590
|
+ }
|
|
591
|
+ $TorrentMG = "magnet:?dn=".rawurlencode($TorrentFileName)."&xt=urn:btih:".$Data['info_hash']."&as=https://".SITE_DOMAIN."/".str_replace('&','%26',$TorrentDL)."&tr=".implode("/".$LoggedUser['torrent_pass']."/announce&tr=",ANNOUNCE_URLS[0])."/".$LoggedUser['torrent_pass']."/announce&xl=".$Data['Size'];
|
585
|
592
|
|
586
|
593
|
?>
|
587
|
594
|
<tr class="group_torrent groupid_<?=$GroupID?> <?=$SnatchedTorrentClass . $SnatchedGroupClass . (!empty($LoggedUser['TorrentGrouping']) && $LoggedUser['TorrentGrouping'] == 1 ? ' hidden' : '')?>">
|
|
@@ -647,7 +654,14 @@ $ShowGroups = !(!empty($LoggedUser['TorrentGrouping']) && $LoggedUser['TorrentGr
|
647
|
654
|
}
|
648
|
655
|
$SnatchedTorrentClass = $Data['IsSnatched'] ? ' snatched_torrent' : '';
|
649
|
656
|
$TorrentDL = "torrents.php?action=download&id=".$TorrentID."&authkey=".$LoggedUser['AuthKey']."&torrent_pass=".$LoggedUser['torrent_pass'];
|
650
|
|
- $TorrentMG = "magnet:?xt=urn:btih:".$Data['info_hash']."&as=https://".SITE_DOMAIN."/".str_replace('&','%26',$TorrentDL)."&tr=".implode("/".$LoggedUser['torrent_pass']."/announce&tr=",ANNOUNCE_URLS[0])."/".$LoggedUser['torrent_pass']."/announce&xl=".$Data['Size'];
|
|
657
|
+ if (!($TorrentFileName = $Cache->get_value('torrent_file_name_'.$TorrentID))) {
|
|
658
|
+ $DB->query("SELECT File FROM torrents_files WHERE TorrentID=".$TorrentID);
|
|
659
|
+ list($TorrentFile) = $DB->next_record(MYSQLI_NUM, false);
|
|
660
|
+ $Tor = new BencodeTorrent($TorrentFile);
|
|
661
|
+ $TorrentFileName = $Tor->Dec['info']['name'];
|
|
662
|
+ $Cache->cache_value('torrent_file_name_'.$TorrentID, $TorrentFileName);
|
|
663
|
+ }
|
|
664
|
+ $TorrentMG = "magnet:?dn=".rawurlencode($TorrentFileName)."&xt=urn:btih:".$Data['info_hash']."&as=https://".SITE_DOMAIN."/".str_replace('&','%26',$TorrentDL)."&tr=".implode("/".$LoggedUser['torrent_pass']."/announce&tr=",ANNOUNCE_URLS[0])."/".$LoggedUser['torrent_pass']."/announce&xl=".$Data['Size'];
|
651
|
665
|
?>
|
652
|
666
|
<tr class="torrent<?=$SnatchedTorrentClass . $SnatchedGroupClass?>">
|
653
|
667
|
<? if ($GroupResults) { ?>
|