added executable permissions if youtube-dl or aria2c doesn't have it
This commit is contained in:
@@ -43,6 +43,9 @@ class Aria2
|
|||||||
} else {
|
} else {
|
||||||
$this->bin = Helper::findBinaryPath('aria2c', __DIR__ . "/../../bin/aria2c");
|
$this->bin = Helper::findBinaryPath('aria2c', __DIR__ . "/../../bin/aria2c");
|
||||||
}
|
}
|
||||||
|
if ($this->isInstalled() && !$this->isExecutable()) {
|
||||||
|
chmod($this->bin, 755);
|
||||||
|
}
|
||||||
$this->setDownloadDir($dir);
|
$this->setDownloadDir($dir);
|
||||||
$this->setTorrentsDir($torrents_dir);
|
$this->setTorrentsDir($torrents_dir);
|
||||||
if (!empty($settings)) {
|
if (!empty($settings)) {
|
||||||
|
|||||||
@@ -33,6 +33,9 @@ class Youtube
|
|||||||
} else {
|
} else {
|
||||||
$this->bin = Helper::findBinaryPath('youtube-dl', __DIR__ . "/../../bin/youtube-dl");
|
$this->bin = Helper::findBinaryPath('youtube-dl', __DIR__ . "/../../bin/youtube-dl");
|
||||||
}
|
}
|
||||||
|
if ($this->isInstalled() && !$this->isExecutable()) {
|
||||||
|
chmod($this->bin, 755);
|
||||||
|
}
|
||||||
$this->setDownloadDir($downloadDir);
|
$this->setDownloadDir($downloadDir);
|
||||||
if (!empty($settings)) {
|
if (!empty($settings)) {
|
||||||
foreach ($settings as $key => $value) {
|
foreach ($settings as $key => $value) {
|
||||||
|
|||||||
Reference in New Issue
Block a user