From dfe9d6273c014ae3097dfac734b348f668920672 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Wed, 23 Mar 2022 14:17:07 +0100 Subject: [PATCH] wait #5171 @1 --- src/Compiler/Links.php | 1 + src/Links/VideoLink.php | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/Compiler/Links.php b/src/Compiler/Links.php index 7a0e7d0..c858354 100644 --- a/src/Compiler/Links.php +++ b/src/Compiler/Links.php @@ -210,6 +210,7 @@ trait Links } $allpages[] = 'background'; $allpages[] = 'archives'; + $allpages[] = 'slider'; foreach ($linkPages as $linkPage => $true) { $allpages[] = $linkPage; } diff --git a/src/Links/VideoLink.php b/src/Links/VideoLink.php index 0bd2052..5fa3156 100644 --- a/src/Links/VideoLink.php +++ b/src/Links/VideoLink.php @@ -83,8 +83,13 @@ class VideoLink extends Link // Get video dimensions from thumbnail if possible (locally uploaded files) $path = file_exists($data->to) ? $data->to : $compiler->wdir . '/' . $data->to; $e = explode(',', `ffprobe -v error -select_streams v:0 -show_entries stream=width,height -of csv=p=0 $path`); - $attr['width'] = $e[0]; - $attr['height'] = $e[1]; + if (count($e) > 1) { + $attr['width'] = $e[0]; + $attr['height'] = $e[1]; + } else { + $attr['width'] = 1920; + $attr['height'] = 1080; + } } return $attr; -- 2.39.5