1
0
mirror of https://github.com/hanxi/xiaomusic.git synced 2025-12-17 16:48:14 +08:00

Default proxy to None.

This commit is contained in:
dzhuang
2023-10-16 18:13:09 +08:00
parent 7e7bb256b5
commit 0ca2adb014
3 changed files with 8 additions and 4 deletions

View File

@@ -296,13 +296,17 @@ class XiaoMusic:
if self.download_proc:
self.download_proc.kill()
self.download_proc = await asyncio.create_subprocess_exec(
sbp_args = (
"yt-dlp", f"ytsearch:{name}",
"-x", "--audio-format", "mp3",
"--paths", self.music_path,
"-o", f"{name}.mp3",
"--proxy", f"{self.proxy}",
"--ffmpeg-location", "./ffmpeg/bin")
if self.proxy:
sbp_args += ("--proxy", f"{self.proxy}")
self.download_proc = await asyncio.create_subprocess_exec(*sbp_args)
await self.do_tts(f"正在下载歌曲{name}")
def get_filename(self, name):