[ENH] Ajout dans l'interface "à la Youtube" de tous types de contenus (Films, séries, etc.)

pull/32/head
Boris 1 year ago
parent 1324ab8978
commit b991c34fdd

@ -2,6 +2,7 @@
define('STATION_NAME', exec('cat ../../../ipfs/.12D*/_xbian.zuid'));
define('HOST', 'astroport');
define('THEME', 'astroport');
/*

@ -1,104 +0,0 @@
:root {
--pink: hsl(338.5, 72.8%, 36.1%);
--canard: hsl(200.8, 100%, 9.6%);
}
body {
background: #121212;
color: white;
margin: 0;
padding: 0;
font-family: Roboto,sans-serif;
}
header {
background: var(--canard);
overflow: hidden;
margin-bottom: 2rem;
}
header * {
font-size: 1.5rem;
padding: 0.5rem;
margin: 0;
color: var(--pink);
text-decoration: none;
}
header span {
color: white;
}
main {
width: 80%;
margin: auto;
}
#videosList {
display: grid;
grid-gap: 1rem 1rem;
grid-auto-flow: row;
grid-template-columns: 322px 322px 322px;
list-style: none;
margin: 0;
padding: 0;
}
#videosList li {
background: var(--canard);
border-color: var(--pink);
border-radius: 0.25rem;
border-width: 1px;
border-style: solid;
overflow: hidden;
}
#videosList .video-title {
padding: 0.5rem 1rem;
}
.video-title,
.video-title a,
.video-title a:visited {
color: white;
font-weight: bold;
text-decoration: none;
}
article {
border-radius: 0.25rem;
background: var(--canard);
width: 58.3%;
margin: auto;
overflow: hidden;
}
article video {
width: 100%;
max-height: 50vh;
background: black;
}
article .video-title {
font-weight: bold;
padding: 1rem 1rem;
font-size: 1.25rem;
margin: 0;
}

@ -0,0 +1 @@
styles/crowdbunker/style.css

@ -9,4 +9,4 @@ PREFIX="$1"
YOU=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1) && [[ ! $YOU ]] && echo "ipfs NOT RUNNING. EXIT" && exit 1
# Filter no ipns link
cat /home/$YOU/.zen/{ipfs,ipfs_swarm}/.*/astroport/kodi/vstream/${PREFIX}ASTRXBIAN | grep -Ev "];;" | sort | uniq | tail -n +2
cat ./{me,swarm}/.*/astroport/kodi/vstream/*ASTRXBIAN | grep -Ev "];;" | sort | uniq | tail -n +2

Before

Width:  |  Height:  |  Size: 9.6 KiB

After

Width:  |  Height:  |  Size: 9.6 KiB

@ -109,3 +109,9 @@ footer {
display: none;
}
#successMsg {
opacity: 0;
transition: opacity 1s;
}

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

@ -4,18 +4,20 @@ require_once('functions.php');
$videosList = array();
exec("/bin/bash -c './get_astrxbian_index.sh'", $videos);
// echo '<pre>'; var_dump($videos); echo '</pre>';
// echo shell_exec('whoami'); // Pour savoir quel utilisateur système exécute les scripts PHP
$videos = array_reverse($videos);
// ## film;MDan5TDuT-0;;Le Manuel de Survie en Dictature v1.1 au format papier;;["onelove"];k51qzi5uqu5dl0hnglpzumjezep2avacrtbx7i15v91elcxac4cpd8290kl1hq;720p;/ipfs/QmZp63RXhLm6QASmw1t2R8fu5waSJFmyW7cmdVNxyuJXzg/MDan5TDuT-0_Le%20Manuel%20de%20Survie%20en%20Dictature%20v1.1%20au%20format%20papier.mp4
foreach ($videos as $v) {
list($a, $youtubeID, $c, $videoName, $e, $src, $h, $quality, $videoURI) = explode(";", $v);
list($a, $youtubeID, $p3, $videoName, $p5, $src, $p7, $definition, $videoURI) = explode(";", $v);
$videoURL = 'http://'. HOST. $videoURI;
$videoEco = 'http://'. HOST. '/ipns/' . $h;
$videoEco = 'http://'. HOST. '/ipns/' . $p7;
$mimeType = guessTypeFromFilename($videoURI);
@ -37,9 +39,9 @@ foreach ($videos as $v) {
?><!DOCTYPE html>
<html>
<head>
<title>Astroport/School: WWW/IPFS - Interfaces et API - </title>
<link rel="stylesheet" href="styles/astroport/style.css" type="text/css" />
<link rel="icon" type="image/png" href="./astroport.png" />
<title>Astroport "<?php echo STATION_NAME; ?></title>
<link rel="stylesheet" href="styles/<?php echo THEME; ?>/style.css" type="text/css" />
<link rel="icon" type="image/png" href="./styles/<?php echo THEME; ?>/logo.png" />
</head>
<body>

@ -10,8 +10,8 @@ $videoMIME = htmlentities($_GET['mime']);
<html>
<head>
<title><?php echo $videoName; ?> - Astroport "<?php echo STATION_NAME; ?></title>
<link rel="stylesheet" href="styles/astroport/style.css" type="text/css" />
<link rel="icon" type="image/png" href="/astroport.png" />
<link rel="stylesheet" href="styles/<?php echo THEME; ?>/style.css" type="text/css" />
<link rel="icon" type="image/png" href="./styles/<?php echo THEME; ?>/logo.png" />
</head>
<body>

@ -0,0 +1,53 @@
<!DOCTYPE html>
<html>
<head>
<title>$TITLE in Astroport</title>
<meta charset="UTF-8">
<meta http-equiv="Refresh" content="7;URL=https://tube.copylaradio.com/ipns/$IPNSLINK/${G1PUB}/">
<link rel='stylesheet' href='http://astroport/styles/astroport/style.css' type='text/css' />
<link rel='icon' type='image/png' href='http://astroport/styles/astroport/logo.png' />
</head>
<body>
<header>
<h6>
<a href='http://astroport/'><span>ASTROPORT</span> <q>${XZUID}</q></a>
</h6>
</header>
<main>
<article>
<h1>$TITLE</h1>
<p>Lancement de la video dans 7 secondes...</p>
<p class="pubkey-and-copy-button">
Ce fichier vous est servi par une station amie. Faites lui un don pour la remercier&nbsp;:
<input type="text" id="pubkey" readonly value="${G1PUB}" />
<button id="copy">Tip !</button>
</p>
<p id="successMsg">
La clef de la station amie est maintenant copiée dans le presse-papier. Vous pouvez la coller dans le client Ğ1 de votre choix (Cesium par exemple) afin de faire votre don 😉
</p>
<script>
function copy() {
var copyText = document.querySelector("input#pubkey");
copyText.select();
document.execCommand("copy");
var successMsg = document.querySelector("#successMsg");
successMsg.style.opacity = "1";
var copyButton = document.querySelector("button#copy");
copyButton.style.animation = "none";
}
document.querySelector("button#copy").addEventListener("click", copy);
</script>
</article>
</main>
</body>
</html>

@ -0,0 +1,30 @@
<!DOCTYPE html>
<html>
<head>
<title>$TITLE in Astroport</title>
<meta charset="UTF-8">
<link rel='stylesheet' href='http://astroport/styles/astroport/style.css' type='text/css' />
<link rel='icon' type='image/png' href='http://astroport/styles/astroport/logo.png' />
</head>
<body>
<header>
<h6>
<a href='http://astroport/'><span>ASTROPORT</span> <q>${XZUID}</q></a>
</h6>
</header>
<main>
<article>
<video autoplay="autoplay" controls>
<source src="http://astroport/ipfs/$IPFSREPFILEID/$URLENCODE_FILE_NAME">
<a href="http://astroport/ipfs/$IPFSREPFILEID/$URLENCODE_FILE_NAME">$TITLE</a>
</video>
<h1 class="video-title">
$TITLE
</h1>
</article>
</main>
</body>
</html>
Loading…
Cancel
Save