fix: #81 修复播放列表时,当前歌曲不在列表没有更换歌曲的问题
This commit is contained in:
parent
5b8054abd9
commit
350d82184f
@ -173,7 +173,6 @@ class Config:
|
||||
converted_value = True
|
||||
else:
|
||||
converted_value = expected_type(v)
|
||||
print(converted_value)
|
||||
return converted_value
|
||||
except (ValueError, TypeError) as e:
|
||||
print(f"Error converting {k}:{v} to {expected_type}: {e}")
|
||||
|
@ -723,6 +723,10 @@ class XiaoMusic:
|
||||
|
||||
# 判断是否播放下一首歌曲
|
||||
def check_play_next(self):
|
||||
# 当前歌曲不在当前播放列表
|
||||
if self.cur_music not in self._play_list:
|
||||
return True
|
||||
|
||||
# 当前没我在播放的歌曲
|
||||
if self.cur_music == "":
|
||||
return True
|
||||
@ -838,7 +842,7 @@ class XiaoMusic:
|
||||
|
||||
# 下一首
|
||||
async def play_next(self, **kwargs):
|
||||
self.log.info("下一首")
|
||||
self.log.info("开始播放下一首")
|
||||
name = self.cur_music
|
||||
self.log.debug("play_next. name:%s, cur_music:%s", name, self.cur_music)
|
||||
if (
|
||||
|
Loading…
Reference in New Issue
Block a user