修复音量获取

This commit is contained in:
涵曦 2024-05-16 23:06:30 +00:00
parent 04b9738a77
commit abbc2f25bb
2 changed files with 2 additions and 0 deletions

View File

@ -14,6 +14,7 @@ $(function(){
append_op_button_name("60分钟后关机");
// 拉取声音
sendcmd("get_volume#");
$.get("/getvolume", function(data, status) {
console.log(data, status, data["volume"]);
$("#volume").val(data.volume);

View File

@ -250,6 +250,7 @@ class XiaoMusic:
async def do_set_volume(self, value):
value = int(value)
self._volume = value
self.log.info(f"声音设置为{value}")
if not self.config.use_command:
try: