This commit is contained in:
benson
2023-04-24 22:36:27 +08:00
parent 932789578e
commit fb7d2c8b56
2 changed files with 2 additions and 2 deletions

View File

@@ -438,7 +438,7 @@ class Helper
public static function getYtdlConfig($uid = null): array public static function getYtdlConfig($uid = null): array
{ {
$config = [ $config = [
'binary' => self::getSettings("ncd_yt_binary", null, Settings::TYPE['SYSTEM']), 'binary' => self::getAdminSettings("ncd_yt_binary"),
'downloadDir' => Helper::getRealDownloadDir(), 'downloadDir' => Helper::getRealDownloadDir(),
'settings' => self::newSettings()->getYtdl(), 'settings' => self::newSettings()->getYtdl(),
]; ];

View File

@@ -29,7 +29,7 @@ class Ytdl
public function init(array $options) public function init(array $options)
{ {
extract($options); extract($options);
if (isset($binary) && $this->isExecutable($binary)) { if (isset($binary) && @is_executable($binary)) {
$this->bin = $binary; $this->bin = $binary;
} else { } else {
$this->bin = __DIR__ . "/../../bin/yt-dlp"; //Helper::findBinaryPath('ytdl', __DIR__ . "/../../bin/yt-dlp"); $this->bin = __DIR__ . "/../../bin/yt-dlp"; //Helper::findBinaryPath('ytdl', __DIR__ . "/../../bin/yt-dlp");