feat(downloaders): 更新 Bilibili 和 YouTube 下载器格式选择- 将 Bilibili 和 YouTube 下载器的格式选择从视频格式更改为音频格式

-优先选择 m4a 格式的最佳音频,如果没有可用的 m4a 格式,则选择最佳音频格式
- 如果没有可用的音频格式,则选择最佳格式
This commit is contained in:
Jefferyhcool
2025-04-15 20:19:46 +08:00
parent c6e0806cb2
commit a966614dd2
2 changed files with 2 additions and 2 deletions

View File

@@ -69,7 +69,7 @@ class BilibiliDownloader(Downloader, ABC):
output_path = os.path.join(output_dir, "%(id)s.%(ext)s")
ydl_opts = {
'format': 'best[height<=480][ext=mp4]/best[height<=480]/best',
'format': 'bestaudio[ext=m4a]/bestaudio/best',
'outtmpl': output_path,
'noplaylist': True,
'quiet': False,

View File

@@ -30,7 +30,7 @@ class YoutubeDownloader(Downloader, ABC):
output_path = os.path.join(output_dir, "%(id)s.%(ext)s")
ydl_opts = {
'format': 'best[height<=480][ext=mp4]/best[height<=480]/best',
'format': 'bestaudio[ext=m4a]/bestaudio/best',
'outtmpl': output_path,
'noplaylist': True,
'quiet': False,