update thumbnail logic to use [id]_thumb.jpg in out-dir
This commit is contained in:
parent
f91f84c12d
commit
663243e956
2 changed files with 8 additions and 6 deletions
|
|
@ -62,8 +62,8 @@ function video_thumb_public_url($config, $videoName){
|
|||
if ($videoName === '') return '';
|
||||
$base = pathinfo($videoName, PATHINFO_FILENAME);
|
||||
foreach (['jpg','jpeg','png','webp','gif'] as $ext) {
|
||||
$file = $config['thumbs_dir'] . '/' . $base . '.' . $ext;
|
||||
if (is_file($file)) return $config['public_thumbs'] . '/' . rawurlencode($base . '.' . $ext) . '?v=' . filemtime($file);
|
||||
$file = $config['videos_dir'] . '/' . $base . '_thumb.' . $ext;
|
||||
if (is_file($file)) return $config['public_videos'] . '/' . rawurlencode($base . '_thumb.' . $ext) . '?v=' . filemtime($file);
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue