[add] video size in video view

This commit is contained in:
Knah Tsaeb 2013-08-20 15:38:46 +02:00
parent 00a56aaf5f
commit 749d6ac386
2 changed files with 8 additions and 0 deletions

View File

@ -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>

View File

@ -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']
);