ENH: harmonisation CSS et récupération des titres via video.json #33

Merged
qo-op merged 3 commits from Boris/astrXbian_UX-et-webUI:master into master 2021-09-19 00:04:36 +02:00
1 changed files with 23 additions and 12 deletions
Showing only changes of commit 4d21e2062b - Show all commits

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>';
}
}