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

clear to play

This commit is contained in:
2025-12-14 11:16:01 +01:00
parent a9e5bb24f0
commit 9c61fcfa38
3 changed files with 21 additions and 5 deletions

View File

@@ -74,6 +74,7 @@
<div class="controls" style="margin-top:10px">
<button id="skip-btn" class="btn">⏭ Skip Track</button>
<button id="readd-btn" class="btn">↺ Re-add Selected</button>
<button id="clear-btn" class="btn">✖ Clear the PUT Queue</button>
</div>
</div>
@@ -371,6 +372,9 @@
ws.send(JSON.stringify({action:"add_to_toplay", songs: [path]}))
Array.from(document.getElementById("playlist-box").children).forEach(c => c.classList.remove("selected"));
});
document.getElementById("clear-btn").addEventListener("click", () => {
ws.send(JSON.stringify({action:"clear_toplay"}))
});
document.getElementById("add-to-put-btn").addEventListener("click", () => {
let fullPath = null;