chore: Update yt-dlp path in Config class
Changes the path of yt-dlp executable to '/usr/bin/yt-dlp' for better compatibility with system installations. This ensures that the program uses the correct binary location, potentially improving performance and simplifying deployment configurations.
This commit is contained in:
parent
4c8a8dbbe7
commit
81b064ce90
1 changed files with 4 additions and 2 deletions
|
@ -24,7 +24,7 @@ class Config
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public string $youtubedl = 'vendor/yt-dlp/yt-dlp/yt_dlp/__main__.py';
|
public string $youtubedl = '/usr/bin/yt-dlp';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* python binary path.
|
* python binary path.
|
||||||
|
@ -276,7 +276,9 @@ class Config
|
||||||
public static function fromFile(string $file): Config
|
public static function fromFile(string $file): Config
|
||||||
{
|
{
|
||||||
if (is_file($file)) {
|
if (is_file($file)) {
|
||||||
return new self(Yaml::parse(strval(file_get_contents($file))));
|
$yaml = Yaml::parse(strval(file_get_contents($file)));
|
||||||
|
assert(is_array($yaml));
|
||||||
|
return new self($yaml);
|
||||||
} else {
|
} else {
|
||||||
throw new ConfigException("Can't find config file at " . $file);
|
throw new ConfigException("Can't find config file at " . $file);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue