diff --git a/lib/Controller/YoutubeController.php b/lib/Controller/YoutubeController.php index 122775c..2bd317c 100644 --- a/lib/Controller/YoutubeController.php +++ b/lib/Controller/YoutubeController.php @@ -81,7 +81,7 @@ class YoutubeController extends Controller $yt = $this->youtube; $yt->audioOnly = (bool) $this->request->getParam('audio-only'); if (!$yt->isInstalled()) { - return new JSONResponse(["error" => "Youtube-dl is not installed!"]); + return new JSONResponse(["error" => "Please install the latest youtube-dl or make the bundled binary file executable in ncdownloader/bin"]); } if (Helper::isGetUrlSite($url)) { return new JSONResponse($this->downloadUrlSite($url)); diff --git a/lib/Tools/Helper.php b/lib/Tools/Helper.php index 977012c..65114af 100644 --- a/lib/Tools/Helper.php +++ b/lib/Tools/Helper.php @@ -201,7 +201,7 @@ class Helper } $dataPath = \OC::$server->getSystemConfig()->getValue('datadirectory'); $paths = ['/usr/local/sbin', '/usr/local/bin', '/usr/sbin', '/usr/bin', '/sbin', '/bin', '/opt/bin', $dataPath . "/bin"]; - $result = null; + $result = $default; $exeSniffer = new ExecutableFinder(); // Returns null if nothing is found $result = $exeSniffer->find($program, $default, $paths); diff --git a/lib/Tools/Youtube.php b/lib/Tools/Youtube.php index ebd70ac..da5d1db 100644 --- a/lib/Tools/Youtube.php +++ b/lib/Tools/Youtube.php @@ -60,7 +60,7 @@ class Youtube if (Helper::ffmpegInstalled()) { $this->addOption('--prefer-ffmpeg'); $this->addOption('--add-metadata'); - $this->setOption('--metadata-from-title',"%(artist)s-%(title)s"); + $this->setOption('--metadata-from-title', "%(artist)s-%(title)s"); $this->addOption('--extract-audio'); } $this->outTpl = "/%(id)s-%(title)s.m4a";