35 lines
695 B
PHP
35 lines
695 B
PHP
<?php
|
|
require_once "src/util.php";
|
|
|
|
$files = [];
|
|
$dirIter = new RecursiveDirectoryIterator("anime");
|
|
$iter = new RecursiveIteratorIterator($dirIter);
|
|
|
|
foreach ($iter as $entry)
|
|
{
|
|
if ($entry->isFile() && str_ends_with($entry->getFileName(), ".mkv"))
|
|
{
|
|
$files[] = $entry;
|
|
}
|
|
}
|
|
|
|
?>
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>Anime</title>
|
|
</head>
|
|
<body>
|
|
<ul>
|
|
<?php
|
|
foreach ($files as $file)
|
|
{
|
|
$path = $file->getPathName();
|
|
$id = urlsafe_b64encode($path);
|
|
echo "<li><a href=\"player.html#$id\">$path</a></li>";
|
|
}
|
|
?>
|
|
</ul>
|
|
</body>
|
|
</html>
|