forked from axiom-team/astrXbian
Remplacement page IPNS par lien IPFS direct
This commit is contained in:
parent
9ff050917c
commit
85415105c8
|
@ -6,7 +6,7 @@ $i = 0;
|
||||||
$div = 9;
|
$div = 9;
|
||||||
$r = rand(0, ($div - 1));
|
$r = rand(0, ($div - 1));
|
||||||
$j = 0;
|
$j = 0;
|
||||||
$maxElt = 16;
|
$maxElt = 3;
|
||||||
|
|
||||||
// require('php-ipfs-api/vendor/autoload.php');
|
// require('php-ipfs-api/vendor/autoload.php');
|
||||||
// use Cloutier\PhpIpfsApi\IPFS;
|
// use Cloutier\PhpIpfsApi\IPFS;
|
||||||
|
@ -85,13 +85,13 @@ foreach ($videos as $v) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
++$j;
|
++$j;
|
||||||
if ($j > $maxElt) {
|
if ($j > $maxElt) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
$duration = NULL;
|
$duration = NULL;
|
||||||
$thumbURL = '';
|
$thumbURL = '';
|
||||||
$videoTitle = NULL;
|
$videoTitle = NULL;
|
||||||
|
@ -293,6 +293,7 @@ foreach ($videosList as $video) {
|
||||||
|
|
||||||
$href = 'youtube_watch.php?uri='. $video['uri'] . '&name='. urlencode($displayTitle) .'&mime='. $video['mime'];
|
$href = 'youtube_watch.php?uri='. $video['uri'] . '&name='. urlencode($displayTitle) .'&mime='. $video['mime'];
|
||||||
|
|
||||||
|
/*
|
||||||
echo '
|
echo '
|
||||||
<p class="thumbnail">
|
<p class="thumbnail">
|
||||||
<a href="/ipns/'. $video['ipnsHash'] .'">
|
<a href="/ipns/'. $video['ipnsHash'] .'">
|
||||||
|
@ -300,6 +301,14 @@ foreach ($videosList as $video) {
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
';
|
';
|
||||||
|
*/
|
||||||
|
echo '
|
||||||
|
<p class="thumbnail">
|
||||||
|
<a href="'. $href .'">
|
||||||
|
<img src="'. $video['thumbURL'] . '" alt="'. $displayTitle . '" />
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
';
|
||||||
|
|
||||||
if (isset($video['duration'])) {
|
if (isset($video['duration'])) {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue