summaryrefslogtreecommitdiffstats
path: root/lib/private/preview
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2014-11-20 12:41:55 +0100
committerJoas Schilling <nickvergessen@gmx.de>2014-11-20 12:41:55 +0100
commitd15f1882f91c4ab71c8a41f62f5277bff5fa4ea6 (patch)
treeccc21757b844818ebf094e92b80470cc0693444f /lib/private/preview
parent64421d76fdd8b718c3f0fccf94ba0028adc593b4 (diff)
downloadnextcloud-server-d15f1882f91c4ab71c8a41f62f5277bff5fa4ea6.tar.gz
nextcloud-server-d15f1882f91c4ab71c8a41f62f5277bff5fa4ea6.zip
Simplify the binary finding code in the movie preview class
Diffstat (limited to 'lib/private/preview')
-rw-r--r--lib/private/preview/movies.php14
1 files changed, 3 insertions, 11 deletions
diff --git a/lib/private/preview/movies.php b/lib/private/preview/movies.php
index 8217ad24409..d69266ceb33 100644
--- a/lib/private/preview/movies.php
+++ b/lib/private/preview/movies.php
@@ -10,18 +10,10 @@ namespace OC\Preview;
// movie preview is currently not supported on Windows
if (!\OC_Util::runningOnWindows()) {
- $isExecEnabled = \OC_Helper::is_function_enabled('exec');
- $ffmpegBinary = null;
- $avconvBinary = null;
-
- if ($isExecEnabled) {
- $avconvBinary = \OC_Helper::findBinaryPath('avconv');
- if (!$avconvBinary) {
- $ffmpegBinary = \OC_Helper::findBinaryPath('ffmpeg');
- }
- }
+ $avconvBinary = \OC_Helper::findBinaryPath('avconv');
+ $ffmpegBinary = ($avconvBinary) ? null : \OC_Helper::findBinaryPath('ffmpeg');
- if($isExecEnabled && ( $avconvBinary || $ffmpegBinary )) {
+ if ($avconvBinary || $ffmpegBinary) {
class Movie extends Provider {
public static $avconvBinary;