mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-14 18:48:21 -07:00
Minor improvements (#1627)
* Minor improvements * Update playback_m3u.tpl * Update playback_m3u.php * Updated * Update CHANGELOG.md
This commit is contained in:
parent
d5557c4a43
commit
2657056ead
4 changed files with 7 additions and 6 deletions
|
@ -18,7 +18,7 @@
|
|||
- Fixed template caching issue [\#1622](https://github.com/torrentpier/torrentpier/pull/1622) ([belomaxorka](https://github.com/belomaxorka))
|
||||
- Fixed `md5()` deprecated in PHP 8.4 [\#1561](https://github.com/torrentpier/torrentpier/pull/1561) ([belomaxorka](https://github.com/belomaxorka))
|
||||
- Increased `USEREMAIL_MAX_LENGTH` [\#1566](https://github.com/torrentpier/torrentpier/pull/1566) ([belomaxorka](https://github.com/belomaxorka))
|
||||
- Minor improvements [\#1570](https://github.com/torrentpier/torrentpier/pull/1570), [\#1571](https://github.com/torrentpier/torrentpier/pull/1571), [\#1575](https://github.com/torrentpier/torrentpier/pull/1575), [\#1589](https://github.com/torrentpier/torrentpier/pull/1589), [\#1592](https://github.com/torrentpier/torrentpier/pull/1592), [\#1605](https://github.com/torrentpier/torrentpier/pull/1605), [\#1611](https://github.com/torrentpier/torrentpier/pull/1611), [\#1612](https://github.com/torrentpier/torrentpier/pull/1612), [\#1615](https://github.com/torrentpier/torrentpier/pull/1615) ([belomaxorka](https://github.com/belomaxorka))
|
||||
- Minor improvements [\#1570](https://github.com/torrentpier/torrentpier/pull/1570), [\#1571](https://github.com/torrentpier/torrentpier/pull/1571), [\#1575](https://github.com/torrentpier/torrentpier/pull/1575), [\#1589](https://github.com/torrentpier/torrentpier/pull/1589), [\#1592](https://github.com/torrentpier/torrentpier/pull/1592), [\#1605](https://github.com/torrentpier/torrentpier/pull/1605), [\#1611](https://github.com/torrentpier/torrentpier/pull/1611), [\#1612](https://github.com/torrentpier/torrentpier/pull/1612), [\#1615](https://github.com/torrentpier/torrentpier/pull/1615), [\#1627](https://github.com/torrentpier/torrentpier/pull/1627) ([belomaxorka](https://github.com/belomaxorka))
|
||||
- Updated deps [\#1563](https://github.com/torrentpier/torrentpier/pull/1563), [\#1564](https://github.com/torrentpier/torrentpier/pull/1564), [\#1608](https://github.com/torrentpier/torrentpier/pull/1608), [\#1609](https://github.com/torrentpier/torrentpier/pull/1609), [\#1610](https://github.com/torrentpier/torrentpier/pull/1610) ([belomaxorka](https://github.com/belomaxorka))
|
||||
- New Crowdin updates [\#1569](https://github.com/torrentpier/torrentpier/pull/1569), [\#1572](https://github.com/torrentpier/torrentpier/pull/1572), [\#1573](https://github.com/torrentpier/torrentpier/pull/1573), [\#1574](https://github.com/torrentpier/torrentpier/pull/1574), [\#1588](https://github.com/torrentpier/torrentpier/pull/1588), [\#1590](https://github.com/torrentpier/torrentpier/pull/1590), [\#1600](https://github.com/torrentpier/torrentpier/pull/1600), [\#1601](https://github.com/torrentpier/torrentpier/pull/1601), [\#1606](https://github.com/torrentpier/torrentpier/pull/1606), [\#1607](https://github.com/torrentpier/torrentpier/pull/1607), [\#1625](https://github.com/torrentpier/torrentpier/pull/1625), [\#1626](https://github.com/torrentpier/torrentpier/pull/1626) ([Exileum](https://github.com/Exileum))
|
||||
|
||||
|
|
|
@ -1272,6 +1272,7 @@ $lang['DOWNLOAD_M3U_FILE'] = 'Download .m3u file';
|
|||
$lang['PLAYBACK_M3U'] = 'Playback .m3u file';
|
||||
$lang['STREAM'] = 'Stream';
|
||||
$lang['COPY_STREAM_LINK'] = 'Copy stream link to clipboard';
|
||||
$lang['M3U_NOT_SUPPORTED'] = 'This file cannot be played in the browser...';
|
||||
$lang['M3U_NOTICE'] = 'Some browsers do not support playback of certain video formats. In such a case, you can download the .m3u file and play it using a third-party player';
|
||||
|
||||
$lang['ATTACHMENT'] = 'Attachments';
|
||||
|
|
|
@ -44,9 +44,6 @@ $m3uData = $m3uParser->parseFile($m3uFile);
|
|||
|
||||
$filesCount = 0;
|
||||
foreach ($m3uData as $entry) {
|
||||
$filesCount++;
|
||||
$rowClass = ($filesCount % 2) ? 'row1' : 'row2';
|
||||
|
||||
// Validate URL
|
||||
$streamLink = $entry->getPath();
|
||||
if (!filter_var($streamLink, FILTER_VALIDATE_URL)) {
|
||||
|
@ -69,6 +66,8 @@ foreach ($m3uData as $entry) {
|
|||
// Validate file extension
|
||||
$getExtension = pathinfo($title, PATHINFO_EXTENSION);
|
||||
|
||||
$filesCount++;
|
||||
$rowClass = ($filesCount % 2) ? 'row1' : 'row2';
|
||||
$template->assign_block_vars('m3ulist', [
|
||||
'ROW_NUMBER' => $filesCount,
|
||||
'ROW_CLASS' => $rowClass,
|
||||
|
|
|
@ -16,11 +16,12 @@
|
|||
<td>
|
||||
<a href="#" onclick="return false;" class="copyElement" data-clipboard-text="{m3ulist.STREAM_LINK}">{L_COPY_STREAM_LINK}</a> ·
|
||||
<a target="_blank" href="{m3ulist.M3U_DL_LINK}">{L_DOWNLOAD_M3U_FILE}</a>
|
||||
<!-- IF m3ulist.IS_VALID --><hr><!-- IF m3ulist.IS_AUDIO -->
|
||||
<hr>
|
||||
<!-- IF m3ulist.IS_VALID --><!-- IF m3ulist.IS_AUDIO -->
|
||||
<audio preload="none" src="{m3ulist.STREAM_LINK}" controls></audio>
|
||||
<!-- ELSE -->
|
||||
<video preload="none" width="500" height="auto" src="{m3ulist.STREAM_LINK}" controls></video>
|
||||
<!-- ENDIF --><!-- ENDIF -->
|
||||
<!-- ENDIF --><!-- ELSE --><span class="warnColor2">{L_M3U_NOT_SUPPORTED}</span><!-- ENDIF -->
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue