From 13be997ddbcdfe7d2d46dd2ccf2caa2e698577ce Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Tue, 18 Oct 2016 09:27:28 +0200 Subject: [PATCH] Throw exception if youtube-dl can't be found --- classes/VideoDownload.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/classes/VideoDownload.php b/classes/VideoDownload.php index 498a56b..74b927b 100644 --- a/classes/VideoDownload.php +++ b/classes/VideoDownload.php @@ -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],