1 changed files with 0 additions and 80 deletions
@ -1,80 +0,0 @@
|
||||
<?php |
||||
/* |
||||
* This file is part of video_metadata. |
||||
* |
||||
* video_metadata is free software: you can redistribute it and/or modify |
||||
* it under the terms of the GNU General Public License as published by |
||||
* the Free Software Foundation, either version 3 of the License, or |
||||
* (at your option) any later version. |
||||
* |
||||
* video_metadata is distributed in the hope that it will be useful, |
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
* GNU General Public License for more details. |
||||
* |
||||
* You should have received a copy of the GNU General Public License |
||||
* along with video_metadata. If not, see <https://www.gnu.org/licenses/>. |
||||
*/ |
||||
|
||||
|
||||
const VIDEO_DIR = '../video/unwatched'; |
||||
|
||||
$contents = []; |
||||
$errors = []; |
||||
|
||||
if (is_dir(VIDEO_DIR)) { |
||||
$handle = opendir(VIDEO_DIR); |
||||
|
||||
if (!$handle) { |
||||
$errors[] = "error opening directory: " . VIDEO_DIR; |
||||
return; |
||||
} |
||||
|
||||
while (false !== ($entry = readdir($handle))) { |
||||
if ($entry != '.' && $entry != '..') |
||||
$contents[] = $entry; |
||||
} |
||||
} |
||||
|
||||
?> |
||||
<!DOCTYPE html> |
||||
<html> |
||||
<head> |
||||
<link rel="stylesheet" href="static/default.css" /> |
||||
</head> |
||||
<body> |
||||
|
||||
<div id="info"> |
||||
<pre> |
||||
VIDEO_DIR: "<?php echo VIDEO_DIR; ?>"
|
||||
count: "<?php echo count($contents); ?>"
|
||||
</pre> |
||||
</div> |
||||
|
||||
<h3>errors</h3> |
||||
<div id="errors" class="debug"> |
||||
<pre> |
||||
<?php |
||||
if (!empty($errors)) |
||||
print_r($errors); |
||||
?> |
||||
</pre> |
||||
</div> |
||||
|
||||
<div id="listing"> |
||||
<?php |
||||
if (!empty($contents)) { |
||||
echo "<ul>"; |
||||
foreach ($contents as $item) |
||||
echo "<li>$item</li>"; |
||||
echo "</ul>"; |
||||
} |
||||
?> |
||||
</div> |
||||
|
||||
<h3>debug</h3> |
||||
<div class="debug"> |
||||
<pre><?php print_r($contents); ?></pre>
|
||||
</div> |
||||
|
||||
</body> |
||||
Loading…
Reference in new issue