forked from axiom-team/astrXbian
[FIX] swarm_files.php display
This commit is contained in:
parent
a40ac57327
commit
4d21e2062b
|
@ -26,13 +26,21 @@ foreach ($swarm as $peer) {
|
|||
|
||||
$peerName = file_get_contents('swarm/' . $peer . '/G1SSB/_g1.astroport_title');
|
||||
|
||||
echo '<h2>'. $peerName . ' ['. substr($peer, 0, 5) . '…' . substr($peer, -4) . ']</h2>';
|
||||
echo '
|
||||
<h2>
|
||||
'. trim($peerName) . ' ['. substr($peer, 0, 5) . '…' . substr($peer, -4) . ']
|
||||
</h2>
|
||||
';
|
||||
|
||||
$files = scandir('swarm/' . $peer . '/astroport/kodi/vstream');
|
||||
|
||||
foreach ($files as $f) {
|
||||
|
||||
echo '<h3>' . getCollectionType($f) . '</h3>';
|
||||
echo '
|
||||
<h3>
|
||||
' . getCollectionType($f) . '
|
||||
</h3>
|
||||
';
|
||||
|
||||
$collection = file_get_contents('swarm/' . $peer . '/astroport/kodi/vstream/' . $f);
|
||||
$collection = trim($collection);
|
||||
|
@ -48,23 +56,26 @@ foreach ($swarm as $peer) {
|
|||
list($a, $b, $c, $videoName, $e, $g, $h, $m, $videoURI) = explode(";", $v);
|
||||
|
||||
|
||||
$videoURL = 'https://'. HOST. $videoURI;
|
||||
$videoURL = /* 'http://'. HOST. */ $videoURI;
|
||||
$mimeType = guessTypeFromFilename($videoURL);
|
||||
|
||||
if ($mimeType == 'video/mp4') {
|
||||
|
||||
echo '<li>';
|
||||
echo '
|
||||
|
||||
<li>
|
||||
<a href="'. $videoURL . '">' . $videoName . '</a><br />
|
||||
('. $mimeType . ')<br />
|
||||
|
||||
<video controls width="320" height="240" preload="none">
|
||||
<video controls width="320" height="240">
|
||||
<source src="'. $videoURL .'" type="'. $mimeType .'">
|
||||
<a href="'. $videoURL . '">' . $videoName . '</a>
|
||||
</video>';
|
||||
</video>
|
||||
</li>
|
||||
';
|
||||
}
|
||||
}
|
||||
|
||||
echo '</li>';
|
||||
}
|
||||
}
|
||||
echo '</ul>';
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue