bugfix: kill download progress don't raise error

This commit is contained in:
涵曦 2023-10-16 22:53:02 +08:00
parent ca07ed0dd3
commit 63eb0c22cb

View File

@ -294,7 +294,10 @@ class XiaoMusic:
# 下载歌曲
async def download(self, name):
if self.download_proc:
self.download_proc.kill()
try:
self.download_proc.kill()
except ProcessLookupError:
pass
sbp_args = (
"yt-dlp", f"ytsearch:{name}",