fixed locale issue for youtube-dl;updated regex rules for matching filename

This commit is contained in:
huangjx
2021-09-15 13:18:19 +08:00
parent 2e834d4f9c
commit 7427f395f5
4 changed files with 18 additions and 13 deletions

View File

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