summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorSimon L <szaimen@e.mail.de>2023-01-18 22:14:22 +0100
committerGitHub <noreply@github.com>2023-01-18 22:14:22 +0100
commit752f3a39f9e4745a241063ff7f3322b753fa7bbb (patch)
tree78407bc0c162602cf2d056ccc7f70076954599ca /lib/private
parent444f11b857ffb63382409df3c572e49d4ca2bf4d (diff)
parentfa12219629fb0bb18c5caef2e48e5b5d45296406 (diff)
downloadnextcloud-server-752f3a39f9e4745a241063ff7f3322b753fa7bbb.tar.gz
nextcloud-server-752f3a39f9e4745a241063ff7f3322b753fa7bbb.zip
Merge pull request #36225 from Jachhj-sc/patch-1
Add check config.php for ffmpeg_path in PreviewManager.php. fix for snap no video preview
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/PreviewManager.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/private/PreviewManager.php b/lib/private/PreviewManager.php
index 87e709e9bcc..367f0c1c057 100644
--- a/lib/private/PreviewManager.php
+++ b/lib/private/PreviewManager.php
@@ -417,11 +417,15 @@ class PreviewManager implements IPreview {
// Video requires avconv or ffmpeg
if (in_array(Preview\Movie::class, $this->getEnabledDefaultProvider())) {
- $movieBinary = $this->binaryFinder->findBinaryPath('avconv');
+ $movieBinary = $this->config->getSystemValue('preview_ffmpeg_path', null);
if (!is_string($movieBinary)) {
- $movieBinary = $this->binaryFinder->findBinaryPath('ffmpeg');
+ $movieBinary = $this->binaryFinder->findBinaryPath('avconv');
+ if (!is_string($movieBinary)) {
+ $movieBinary = $this->binaryFinder->findBinaryPath('ffmpeg');
+ }
}
+
if (is_string($movieBinary)) {
$this->registerCoreProvider(Preview\Movie::class, '/video\/.*/', ["movieBinary" => $movieBinary]);
}