mirror of
https://github.com/SuperBFG7/ympd
synced 2024-11-05 06:16:16 +00:00
Fix buttons shuffle and clear in queue card
This commit is contained in:
parent
54b10bdaf3
commit
4d42ac927b
@ -122,10 +122,10 @@
|
||||
</div>
|
||||
</div>
|
||||
<div id="queue-actions" class="btn-group mr-2">
|
||||
<button type="button" class="btn btn-secondary" onclick="socket.send('MPD_API_SEND_SHUFFLE');" title="Shuffle queue">
|
||||
<button type="button" class="btn btn-secondary" onclick="shuffleQueue();" title="Shuffle queue">
|
||||
<span class="material-icons">shuffle</span>
|
||||
</button>
|
||||
<button type="button" class="btn btn-secondary" onclick="socket.send('MPD_API_RM_ALL');" title="Clear queue">
|
||||
<button type="button" class="btn btn-secondary" onclick="clearQueue();" title="Clear queue">
|
||||
<span class="material-icons">clear_all</span>
|
||||
</button>
|
||||
<button type="button" class="btn btn-secondary" data-toggle="modal" data-target="#savequeue" title="Save queue">
|
||||
|
@ -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 });
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user