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