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): def isdownloading(self):
if not self.download_proc: if not self.download_proc:
return False return False
if (
self.download_proc.returncode is not None if self.download_proc.returncode is not None:
and self.download_proc.returncode < 0 self.log.info(
): f"Process exited with returncode:{self.download_proc.returncode}"
self.log.info(f"returncode isdownloading:{self.download_proc.returncode}") )
return False return False
self.log.info("Download Process is still running.")
return True return True
# 下载歌曲 # 下载歌曲