fix: 是否下载中判断错误导致播放无法自动重新开始播放

This commit is contained in:
涵曦 2024-07-02 03:28:11 +00:00
parent 9a3e513b6c
commit 3b720b7367

View File

@ -345,12 +345,14 @@ class XiaoMusic:
def isdownloading(self):
if not self.download_proc:
return False
if (
self.download_proc.returncode is not None
and self.download_proc.returncode < 0
):
self.log.info(f"returncode isdownloading:{self.download_proc.returncode}")
if self.download_proc.returncode is not None:
self.log.info(
f"Process exited with returncode:{self.download_proc.returncode}"
)
return False
self.log.info("Download Process is still running.")
return True
# 下载歌曲