Skip to content

Commit

Permalink
fix: #130 单曲循环的模式下,播放列表的指令不生效
Browse files Browse the repository at this point in the history
  • Loading branch information
hanxi committed Jul 22, 2024
1 parent 7877775 commit 71dfc6d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion xiaomusic/static/debug.html
Original file line number Diff line number Diff line change
Expand Up @@ -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: () => {
Expand Down
1 change: 1 addition & 0 deletions xiaomusic/xiaomusic.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down

0 comments on commit 71dfc6d

Please sign in to comment.