1
0
mirror of https://github.com/SuperBFG7/ympd synced 2025-10-22 09:27:41 +00:00

Fix buttons shuffle and clear in queue card

This commit is contained in:
jcorporation
2018-07-03 22:57:31 +01:00
parent 54b10bdaf3
commit 4d42ac927b
2 changed files with 10 additions and 2 deletions

View File

@@ -954,6 +954,14 @@ function updatePlayIcon(obj) {
}
}
function shuffleQueue() {
sendAPI({"cmd":"MPD_API_SEND_SHUFFLE"});
}
function clearQueue() {
sendAPI({"cmd":"MPD_API_RM_ALL"});
}
function sendAPI(request, callback) {
$.ajax({url: "/api", contentType:"application/json", method: "POST", data: JSON.stringify(request), success: callback });
}