fix: #130 单曲循环的模式下,播放列表的指令不生效

This commit is contained in:
涵曦 2024-07-22 15:30:30 +00:00
parent 7877775495
commit 71dfc6d468
2 changed files with 3 additions and 1 deletions

View File

@ -30,11 +30,12 @@ function postJSON() {
function sendDebugCmd() { function sendDebugCmd() {
var cmd = $("#cmd").val(); var cmd = $("#cmd").val();
var did = localStorage.getItem('cur_did');
$.ajax({ $.ajax({
type: "POST", type: "POST",
url: "/cmd", url: "/cmd",
contentType: "application/json; charset=utf-8", contentType: "application/json; charset=utf-8",
data: JSON.stringify({cmd: cmd}), data: JSON.stringify({did: did, cmd: cmd}),
success: () => { success: () => {
}, },
error: () => { error: () => {

View File

@ -883,6 +883,7 @@ class XiaoMusicDevice:
self.device.play_type == PLAY_TYPE_ALL self.device.play_type == PLAY_TYPE_ALL
or self.device.play_type == PLAY_TYPE_RND or self.device.play_type == PLAY_TYPE_RND
or name == "" or name == ""
or (name not in self._play_list)
): ):
name = self.get_next_music() name = self.get_next_music()
self.log.info(f"play_next. name:{name}, cur_music:{self.cur_music}") self.log.info(f"play_next. name:{name}, cur_music:{self.cur_music}")