diff --git a/xiaomusic/static/debug.html b/xiaomusic/static/debug.html index c7f9f6a53..d90963769 100644 --- a/xiaomusic/static/debug.html +++ b/xiaomusic/static/debug.html @@ -30,11 +30,12 @@ function sendDebugCmd() { var cmd = $("#cmd").val(); + var did = localStorage.getItem('cur_did'); $.ajax({ type: "POST", url: "/cmd", contentType: "application/json; charset=utf-8", - data: JSON.stringify({cmd: cmd}), + data: JSON.stringify({did: did, cmd: cmd}), success: () => { }, error: () => { diff --git a/xiaomusic/xiaomusic.py b/xiaomusic/xiaomusic.py index 09e29360a..38217e081 100644 --- a/xiaomusic/xiaomusic.py +++ b/xiaomusic/xiaomusic.py @@ -883,6 +883,7 @@ async def _play_next(self): self.device.play_type == PLAY_TYPE_ALL or self.device.play_type == PLAY_TYPE_RND or name == "" + or (name not in self._play_list) ): name = self.get_next_music() self.log.info(f"play_next. name:{name}, cur_music:{self.cur_music}")