mirror of
https://github.com/nextcloud/server.git
synced 2026-02-20 00:12:30 -05:00
Update PreviewManager.php
add a check in config.php for a configured movieBinary path. so now it first checks in config.php if preview_ffmpeg_path is configured. Signed-off-by: William <william.hak57@gmail.com>
This commit is contained in:
parent
9e08e49998
commit
1409a7cc92
1 changed files with 8 additions and 3 deletions
|
|
@ -417,11 +417,16 @@ class PreviewManager implements IPreview {
|
|||
|
||||
// Video requires avconv or ffmpeg
|
||||
if (in_array(Preview\Movie::class, $this->getEnabledDefaultProvider())) {
|
||||
$movieBinary = $this->binaryFinder->findBinaryPath('avconv');
|
||||
if (!is_string($movieBinary)) {
|
||||
$movieBinary = $this->binaryFinder->findBinaryPath('ffmpeg');
|
||||
|
||||
$movieBinary = $this->config->getSystemValue('preview_ffmpeg_path', null);
|
||||
if(!is_string($movieBinary)){
|
||||
$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]);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue