0
1
mirror of https://github.com/radio95-rnt/RadioPlayer.git synced 2026-02-26 13:52:00 +01:00

sync toplay better

This commit is contained in:
2025-12-13 23:03:59 +01:00
parent 9908fc818b
commit 0ca4ae509f
2 changed files with 21 additions and 16 deletions

View File

@@ -170,7 +170,7 @@
} else if(msg.event === "progress"){
applyProgressState(msg.data);
} else if(msg.event === "toplay") {
putQueue = msg.response.data || [];
putQueue = msg.data.data || [];
renderPutQueue();
} else if(msg.event === "request_dir") {
applySubdir(msg.data || {})
@@ -399,7 +399,6 @@
function sendAddToToplay(songs){
if(ws && ws.readyState === WebSocket.OPEN){
ws.send(JSON.stringify({action:"add_to_toplay", songs: songs}));
setTimeout(() => ws.send(JSON.stringify({action:"get_toplay"})), 250);
}
}