[add] show file size and replace size by dimension
This commit is contained in:
parent
02333b253f
commit
910e928ba5
|
@ -295,8 +295,12 @@ if (!empty($ci['ac']) && $ci['ac'] === 'view' && !empty($listCurrentFile)) {
|
|||
<td>', $videoInfo['duration'], '</td>
|
||||
<tr>
|
||||
<tr>
|
||||
<th>Size</th>
|
||||
<th>Dimension</th>
|
||||
<td>', $videoInfo['size'], '</td>
|
||||
<tr>
|
||||
<tr>
|
||||
<th>Size</th>
|
||||
<td>', humanFilesize(filesize($videoInfo['hash'].'.webm')), '</td>
|
||||
<tr>
|
||||
<th>Publish date</th>
|
||||
<td>', date("d m Y", strtotime($videoInfo['uploadDate'])), '</td>
|
||||
|
|
|
@ -754,6 +754,12 @@ function clearCache() {
|
|||
}
|
||||
}
|
||||
|
||||
function humanFilesize($bytes, $decimals = 2) {
|
||||
$sz = 'BKMGTP';
|
||||
$factor = floor((strlen($bytes) - 1) / 3);
|
||||
return sprintf("%.{$decimals}f", $bytes / pow(1024, $factor)) . @$sz[$factor];
|
||||
}
|
||||
|
||||
if (isset($ci['ac']) && !empty($ci['ac']) && $ci['ac'] === 'm3u') {
|
||||
makePLaylist($ci['bc']);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue