[FIX] swarm_files.php display

This commit is contained in:
Boris 2021-09-18 14:08:44 +02:00
parent a40ac57327
commit 4d21e2062b
1 changed files with 23 additions and 12 deletions

View File

@ -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 '
<a href="'. $videoURL . '">' . $videoName . '</a><br />
('. $mimeType . ')<br />
<li>
<a href="'. $videoURL . '">' . $videoName . '</a><br />
('. $mimeType . ')<br />
<video controls width="320" height="240" preload="none">
<source src="'. $videoURL .'" type="'. $mimeType .'">
<a href="'. $videoURL . '">' . $videoName . '</a>
</video>';
echo '</li>';
<video controls width="320" height="240">
<source src="'. $videoURL .'" type="'. $mimeType .'">
<a href="'. $videoURL . '">' . $videoName . '</a>
</video>
</li>
';
}
}
echo '</ul>';
}
}