display error message when youtube-dl is not properly installed or has no executable permission
This commit is contained in:
@@ -81,7 +81,7 @@ class YoutubeController extends Controller
|
|||||||
$yt = $this->youtube;
|
$yt = $this->youtube;
|
||||||
$yt->audioOnly = (bool) $this->request->getParam('audio-only');
|
$yt->audioOnly = (bool) $this->request->getParam('audio-only');
|
||||||
if (!$yt->isInstalled()) {
|
if (!$yt->isInstalled()) {
|
||||||
return new JSONResponse($this->installYTD());
|
return new JSONResponse(["error" => "Youtube-dl is not installed!"]);
|
||||||
}
|
}
|
||||||
if (Helper::isGetUrlSite($url)) {
|
if (Helper::isGetUrlSite($url)) {
|
||||||
return new JSONResponse($this->downloadUrlSite($url));
|
return new JSONResponse($this->downloadUrlSite($url));
|
||||||
|
|||||||
Reference in New Issue
Block a user