diff --git a/lib/Tools/Helper.php b/lib/Tools/Helper.php index ae429ed..1e4ebdd 100644 --- a/lib/Tools/Helper.php +++ b/lib/Tools/Helper.php @@ -438,7 +438,7 @@ class Helper public static function getYtdlConfig($uid = null): array { $config = [ - 'binary' => self::getSettings("ncd_yt_binary", null, Settings::TYPE['SYSTEM']), + 'binary' => self::getAdminSettings("ncd_yt_binary"), 'downloadDir' => Helper::getRealDownloadDir(), 'settings' => self::newSettings()->getYtdl(), ]; diff --git a/lib/Ytdl/Ytdl.php b/lib/Ytdl/Ytdl.php index 4ae0a9d..01ea91c 100644 --- a/lib/Ytdl/Ytdl.php +++ b/lib/Ytdl/Ytdl.php @@ -29,7 +29,7 @@ class Ytdl public function init(array $options) { extract($options); - if (isset($binary) && $this->isExecutable($binary)) { + if (isset($binary) && @is_executable($binary)) { $this->bin = $binary; } else { $this->bin = __DIR__ . "/../../bin/yt-dlp"; //Helper::findBinaryPath('ytdl', __DIR__ . "/../../bin/yt-dlp");