skiped checking whether the php exec function is enabled when searching for binary path;fixed typo;

This commit is contained in:
huangjx
2021-10-01 19:56:25 +08:00
parent ac2f314119
commit e04181dbee
2 changed files with 4 additions and 6 deletions

View File

@@ -202,11 +202,9 @@ class Helper
$dataPath = \OC::$server->getSystemConfig()->getValue('datadirectory'); $dataPath = \OC::$server->getSystemConfig()->getValue('datadirectory');
$paths = ['/usr/local/sbin', '/usr/local/bin', '/usr/sbin', '/usr/bin', '/sbin', '/bin', '/opt/bin', $dataPath . "/bin"]; $paths = ['/usr/local/sbin', '/usr/local/bin', '/usr/sbin', '/usr/bin', '/sbin', '/bin', '/opt/bin', $dataPath . "/bin"];
$result = null; $result = null;
if (self::is_function_enabled('exec')) { $exeSniffer = new ExecutableFinder();
$exeSniffer = new ExecutableFinder(); // Returns null if nothing is found
// Returns null if nothing is found $result = $exeSniffer->find($program, null, $paths);
$result = $exeSniffer->find($program, null, $paths);
}
// store the value for 5 minutes // store the value for 5 minutes
$memcache->set($program, $result, 300); $memcache->set($program, $result, 300);
return $result; return $result;

View File

@@ -66,7 +66,7 @@ class Youtube
public function setAudioQuality($value = 0) public function setAudioQuality($value = 0)
{ {
$this->addOption('--audio-quality', $value); $this->setOption('--audio-quality', $value);
} }
public function GetUrlOnly() public function GetUrlOnly()