From e04181dbee5be4faf30c8fb4ec2c16753da10223 Mon Sep 17 00:00:00 2001 From: huangjx Date: Fri, 1 Oct 2021 19:56:25 +0800 Subject: [PATCH] skiped checking whether the php exec function is enabled when searching for binary path;fixed typo; --- lib/Tools/Helper.php | 8 +++----- lib/Tools/Youtube.php | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/Tools/Helper.php b/lib/Tools/Helper.php index 20f3ef1..5d68b41 100644 --- a/lib/Tools/Helper.php +++ b/lib/Tools/Helper.php @@ -202,11 +202,9 @@ class Helper $dataPath = \OC::$server->getSystemConfig()->getValue('datadirectory'); $paths = ['/usr/local/sbin', '/usr/local/bin', '/usr/sbin', '/usr/bin', '/sbin', '/bin', '/opt/bin', $dataPath . "/bin"]; $result = null; - if (self::is_function_enabled('exec')) { - $exeSniffer = new ExecutableFinder(); - // Returns null if nothing is found - $result = $exeSniffer->find($program, null, $paths); - } + $exeSniffer = new ExecutableFinder(); + // Returns null if nothing is found + $result = $exeSniffer->find($program, null, $paths); // store the value for 5 minutes $memcache->set($program, $result, 300); return $result; diff --git a/lib/Tools/Youtube.php b/lib/Tools/Youtube.php index ef358e3..b0270f1 100644 --- a/lib/Tools/Youtube.php +++ b/lib/Tools/Youtube.php @@ -66,7 +66,7 @@ class Youtube public function setAudioQuality($value = 0) { - $this->addOption('--audio-quality', $value); + $this->setOption('--audio-quality', $value); } public function GetUrlOnly()