pull/32/head
fred 2 years ago
parent cee575eac1
commit 6b422d79cc

@ -0,0 +1,13 @@
#!/bin/bash
########################################################################
# Author: Astrocrew
# Version: 0.1
# License: AGPL-3.0 (https://choosealicense.com/licenses/agpl-3.0/)
########################################################################
G1KEY="$1"
[[ $G1KEY == "" ]] && echo "PUB KEY MISSINF" && exit 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
## CHECK IF NODE HAS SEND A PAYMENT TO $G1KEY (TODO CHECK ALL BOOTSTRAPS)
~/.zen/astrXbian/zen/jaklis/jaklis.py history -p $G1KEY | grep $G1KEY

@ -6,15 +6,16 @@ define('HOST', 'tube.copylaradio.com');
Youtube Thumbnails
maxresdefault Full resolution image matching the uploaded. This image will not always exist.
sddefault 640x480
hqdefault 480x360 Large Preview
mqdefault 320x180 Large Preview
default 120x 90 Large Preview
0 480x360 Large Preview
1 120x 90 First small thumbnail
2 120x 90 Second small thumbnail
3 120x 90 Third small thumbnail
maxresdefault Full resolution image matching the uploaded. This image will not always exist.
sddefault 640x480
hqdefault 480x360 Large Preview
mqdefault 320x180 Large Preview
default 120x 90 Large Preview
0 480x360 Large Preview
1 120x 90 First small thumbnail
2 120x 90 Second small thumbnail
3 120x 90 Third small thumbnail
*/
define('YOUTUBE_THUMB', 'https://i.ytimg.com/vi/%s/mqdefault.jpg');
define ('MEDIAQR','https://'.HOST.'/ipns/%s/QR.png');

@ -0,0 +1,85 @@
<?php
require_once('conf.php');
require_once('functions.php');
$videosList = array();
exec("/bin/bash -c './get_youtube_videos.sh F'", $videos);
$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);
$videoURL = 'https://'. HOST. $videoURI;
$videoEco = 'https://'. HOST. '/ipns/' . $h;
$mimeType = guessTypeFromFilename($videoURI);
if ($mimeType == 'video/mp4') {
$videosList[] = [
'mime' => $mimeType,
'url' => $videoURL,
'eco' => $videoEco,
'uri' => $videoURI,
'mediakeyipns' => $h,
'name' => $videoName,
'youtubeID' => $youtubeID
];
}
}
?><!DOCTYPE html>
<html>
<head>
<title>Astro CLUB</title>
<link rel="stylesheet" href="crowdbunker.css" type="text/css" />
<link rel="icon" type="image/png" href="./astrocrowdbunker.png" />
<script type="text/javascript" src="./instascan.min.js"></script>
</head>
<body>
<header>
<h1>
<a href="youtube.php"><span>Astroport</span> × <span>Video CLUB</span></a>
</h1>
</header>
<main>
<?php
echo '<ul id="videosList">';
foreach ($videosList as $video) {
echo '<li>';
// $href = 'youtube_watch.php?uri='. $video['uri'] . '&amp;name='. urlencode($video['name']) .'&mime='. $video['mime'];
echo '
<a href="'. $video['eco'] .'">
<img src="'. sprintf(MEDIAQR, $video['mediakeyipns']) . '" alt="'. $video['name'] . '" />
</a>
<p class="video-title">
<a href="'. $video['eco'] .'">
' . $video['name'] . '
</a>
</p>';
echo '</li>';
}
echo '</ul>';
?>
</main>
</body>
</html>
Loading…
Cancel
Save