fixed youtube-dl download items not showing up in centos7 snap installation

This commit is contained in:
huangjx
2022-02-23 17:11:51 +08:00
parent 5bfbeafea5
commit eecee2955e
2 changed files with 2 additions and 2 deletions

View File

@@ -46,7 +46,7 @@ class Youtube
}
}
}
if (empty($lang = getenv('LANG')) || strpos(strtolower($lang), 'utf-8') === false) {
if (empty($lang = getenv('LANG')) || strpos(strtolower($lang), 'c.utf-8') === false) {
$lang = 'C.UTF-8';
}
$this->setEnv('LANG', $lang);

View File

@@ -30,7 +30,7 @@ class YoutubeHelper
}
public function getFilePath($output)
{
$rules = '#\[download\]\s+Destination:\s+(?<filename>.*\.(?<ext>(mp4|mp3|aac|webm|m4a|ogg|3gp|mkv|wav|flv)))$#i';
$rules = '#\[download\]\s+Destination:\s+(?<filename>.*\.(?<ext>(mp4|mp3|aac|webm|m4a|ogg|3gp|mkv|wav|flv)))#i';
preg_match($rules, $output, $matches);