mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 22:03:49 -07:00
feat: Added check for frozen torrent in playback_m3u.php
This commit is contained in:
parent
07399fc00d
commit
6e90830eb7
2 changed files with 10 additions and 1 deletions
|
@ -34,7 +34,7 @@ if (!$topic_id) {
|
|||
}
|
||||
|
||||
// Getting torrent info from database
|
||||
$sql = 'SELECT attach_id, forum_id, info_hash, info_hash_v2
|
||||
$sql = 'SELECT attach_id, forum_id, info_hash, info_hash_v2, tor_status, poster_id
|
||||
FROM ' . BB_BT_TORRENTS . '
|
||||
WHERE topic_id = ' . $topic_id . '
|
||||
LIMIT 1';
|
||||
|
@ -58,6 +58,13 @@ if (!$is_auth['auth_download']) {
|
|||
bb_die($lang['SORRY_AUTH_VIEW_ATTACH']);
|
||||
}
|
||||
|
||||
// Check for frozen torrent
|
||||
$releaser = $userdata['user_id'] == $row['poster_id'];
|
||||
$tor_status = $row['tor_status'];
|
||||
if (!IS_AM && isset($bb_cfg['tor_frozen'][$tor_status]) && !(isset($bb_cfg['tor_frozen_author_download'][$tor_status]) && $releaser)) {
|
||||
bb_die($lang['TOR_STATUS_FORBIDDEN'] . $lang['TOR_STATUS_NAME'][$tor_status]);
|
||||
}
|
||||
|
||||
// Parse M3U file
|
||||
$m3uParser = new M3uParser\M3uParser();
|
||||
$m3uParser->addDefaultTags();
|
||||
|
|
|
@ -173,12 +173,14 @@
|
|||
<!-- ENDIF -->
|
||||
<p class="small">{postrow.attach.tor_reged.FILESIZE}</p>
|
||||
<p style="padding-top: 6px;"><input id="tor-filelist-btn" type="button" class="lite" value="{L_BT_FLIST}" /></p>
|
||||
<!-- IF not postrow.attach.tor_reged.TOR_FROZEN -->
|
||||
<!-- BEGIN tor_server -->
|
||||
<!-- IF postrow.attach.tor_reged.tor_server.TORR_SERVER_M3U_LINK -->
|
||||
<hr/>
|
||||
<a href="{postrow.attach.tor_reged.tor_server.TORR_SERVER_M3U_LINK}" target="_blank"><p><img alt="{L_PLAYBACK_M3U}" src="{postrow.attach.tor_reged.tor_server.TORR_SERVER_M3U_ICON}" width="21" height="21" border="0"></p>{L_PLAYBACK_M3U}</a>
|
||||
<!-- ENDIF -->
|
||||
<!-- END tor_server -->
|
||||
<!-- ENDIF -->
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row1">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue