|
|
|
@ -105,12 +105,12 @@ Class ListController extends Controller {
@@ -105,12 +105,12 @@ Class ListController extends Controller {
|
|
|
|
|
|
|
|
|
|
//图片、视频类型筛选支持 |
|
|
|
|
$showType = $this->get('show', 'all'); |
|
|
|
|
if ($showType == 'image') { |
|
|
|
|
if ($showType == 'image' && !empty($scanResults[$cateId]['files'])) { |
|
|
|
|
$scanResults[$cateId]['files'] = array_filter($scanResults[$cateId]['files'], function($item) { |
|
|
|
|
$imgExts = !empty(FSC::$app['config']['supportedImageExts']) ? FSC::$app['config']['supportedImageExts'] : array('jpg', 'jpeg', 'png', 'webp', 'gif'); |
|
|
|
|
return in_array($item['extension'], $imgExts); |
|
|
|
|
}); |
|
|
|
|
}else if ($showType == 'video') { |
|
|
|
|
}else if ($showType == 'video' && !empty($scanResults[$cateId]['files'])) { |
|
|
|
|
$scanResults[$cateId]['files'] = array_filter($scanResults[$cateId]['files'], function($item) { |
|
|
|
|
$videoExts = !empty(FSC::$app['config']['supportedVideoExts']) ? FSC::$app['config']['supportedVideoExts'] : array('mp4', 'mov', 'm3u8'); |
|
|
|
|
return in_array($item['extension'], $videoExts); |
|
|
|
|