From 71dfc6d46811cb1e1dc03e8c81c5025981a633d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B6=B5=E6=9B=A6?= Date: Mon, 22 Jul 2024 15:30:30 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20#130=20=E5=8D=95=E6=9B=B2=E5=BE=AA?= =?UTF-8?q?=E7=8E=AF=E7=9A=84=E6=A8=A1=E5=BC=8F=E4=B8=8B=EF=BC=8C=E6=92=AD?= =?UTF-8?q?=E6=94=BE=E5=88=97=E8=A1=A8=E7=9A=84=E6=8C=87=E4=BB=A4=E4=B8=8D?= =?UTF-8?q?=E7=94=9F=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- xiaomusic/static/debug.html | 3 ++- xiaomusic/xiaomusic.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/xiaomusic/static/debug.html b/xiaomusic/static/debug.html index c7f9f6a..d909637 100644 --- a/xiaomusic/static/debug.html +++ b/xiaomusic/static/debug.html @@ -30,11 +30,12 @@ function postJSON() { 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 09e2936..38217e0 100644 --- a/xiaomusic/xiaomusic.py +++ b/xiaomusic/xiaomusic.py @@ -883,6 +883,7 @@ class XiaoMusicDevice: 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}")