Throw exception if youtube-dl can't be found

This commit is contained in:
Pierre Rudloff 2016-10-18 09:27:28 +02:00
parent 0d2d1cd548
commit 13be997ddb

View file

@ -33,6 +33,9 @@ class VideoDownload
{
$this->config = Config::getInstance();
$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(
array_merge(
[$this->config->python, $this->config->youtubedl],