[add] video size in video view
This commit is contained in:
parent
00a56aaf5f
commit
749d6ac386
|
@ -256,6 +256,10 @@ if (!empty($ci['ac']) && $ci['ac'] === 'view' && !empty($listCurrentFile)) {
|
|||
<tr>
|
||||
<th>Duration</th>
|
||||
<td>', $videoInfo['duration'], '</td>
|
||||
<tr>
|
||||
<tr>
|
||||
<th>Size</th>
|
||||
<td>', $videoInfo['size'], '</td>
|
||||
<tr>
|
||||
<th>Publish date</th>
|
||||
<td>', date("d m Y", strtotime($videoInfo['uploadDate'])), '</td>
|
||||
|
|
|
@ -455,6 +455,9 @@ function getVideoInfo($file, $dir, $fullListFile) {
|
|||
$path = chunk_split($dir, 8, '/');
|
||||
$descFile = glob($GLOBALS['config']['VIDEODIR']."/".$path.$file."*.json");
|
||||
$jsonInfo = json_decode(file_get_contents($descFile[0]));
|
||||
$jsonSize = explode(' - ', htmlentities($jsonInfo -> format));
|
||||
$jsonSize = explode('x', $jsonSize[1]);
|
||||
$size = $jsonSize[1].'x'.$jsonSize[0];
|
||||
|
||||
$time = gmdate('H\hi\ms\s', $jsonInfo -> duration);
|
||||
|
||||
|
@ -470,6 +473,7 @@ function getVideoInfo($file, $dir, $fullListFile) {
|
|||
'format' => htmlentities($jsonInfo -> format),
|
||||
'ext' => htmlentities($jsonInfo -> ext),
|
||||
'duration' => htmlentities($time),
|
||||
'size' => htmlentities($size),
|
||||
'via' => $postInfo['via'],
|
||||
'licence' => $postInfo['licence']
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue