fixed bugs

This commit is contained in:
huangjx
2022-02-22 20:52:38 +08:00
parent 1815c4f00c
commit 938055e6ea
5 changed files with 43 additions and 25 deletions

View File

@@ -34,7 +34,7 @@ class Youtube
$this->bin = Helper::findBinaryPath('youtube-dl', __DIR__ . "/../../bin/youtube-dl");
}
if ($this->isInstalled() && !$this->isExecutable()) {
chmod($this->bin, 755);
chmod($this->bin, 0744);
}
$this->setDownloadDir($downloadDir);
if (!empty($settings)) {
@@ -246,6 +246,11 @@ class Youtube
return @is_executable($this->bin);
}
public function isReadable()
{
return @is_readable($this->bin);
}
public function getBin()
{
return $this->bin;