forked from WWBN/AVideo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgetStpritsFromAll.php
31 lines (29 loc) · 1011 Bytes
/
getStpritsFromAll.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
//streamer config
require_once '../videos/configuration.php';
ob_end_flush();
if (!isCommandLineInterface()) {
echo 'Command Line only';
exit;
}
if (!AVideoPlugin::loadPlugin('VideoThumbnails')) {
echo 'Plugin VideoThumbnails not exists';
exit;
}
$global['rowCount'] = 99999;
$total = Video::getTotalVideos("", false, true, true, false, false);
$videos = Video::getAllVideosLight("", false, true, false);
$count = 0;
foreach ($videos as $value) {
$count++;
if ($value['type'] !== 'video') {
echo "createStprits: {$count}/{$total} skipp [{$value['id']}] type=[{$value['type']}] {$value['title']}" . PHP_EOL;
continue;
}
$videoFileName = $value['filename'];
echo "createStprits start: {$count}/{$total} [{$value['id']}]" . PHP_EOL;
VideoThumbnails::createStpritsFileName($videoFileName, 1);
echo "createStprits done: {$count}/{$total} (" . ($updated ? "success" : "fail") . ") [{$value['id']}] {$value['title']}" . PHP_EOL;
}
echo 'Done';
exit;