Throw exception if youtube-dl can't be found
This commit is contained in:
parent
0d2d1cd548
commit
13be997ddb
1 changed files with 3 additions and 0 deletions
|
@ -33,6 +33,9 @@ class VideoDownload
|
||||||
{
|
{
|
||||||
$this->config = Config::getInstance();
|
$this->config = Config::getInstance();
|
||||||
$this->procBuilder = new ProcessBuilder();
|
$this->procBuilder = new ProcessBuilder();
|
||||||
|
if (!is_file($this->config->youtubedl)) {
|
||||||
|
throw new \Exception("Can't find youtube-dl at ".$this->config->youtubedl);
|
||||||
|
}
|
||||||
$this->procBuilder->setPrefix(
|
$this->procBuilder->setPrefix(
|
||||||
array_merge(
|
array_merge(
|
||||||
[$this->config->python, $this->config->youtubedl],
|
[$this->config->python, $this->config->youtubedl],
|
||||||
|
|
Loading…
Reference in a new issue