From 039881fdbfa69a33b27f84e8db3671fe8cfac5e6 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Wed, 31 May 2023 22:06:53 +0200 Subject: support skipping the current song while playback is paused --- web/client.html | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'web') diff --git a/web/client.html b/web/client.html index c0aef1f..8e0fa04 100644 --- a/web/client.html +++ b/web/client.html @@ -202,8 +202,8 @@ playing = document.getElementById("playing").innerHTML = ""; } - function handlePlay(_currentSongs) { - {{if .IsAdmin}} document.getElementById("ppbutton").innerHTML = 'Pause'; {{end}} + function handlePlayOrNext(cmd, _currentSongs) { + {{if .IsAdmin}}if (cmd == "play") { document.getElementById("ppbutton").innerHTML = 'Pause'; }{{end}} if (_currentSongs == null || _currentSongs.length == 0) { return; @@ -257,7 +257,10 @@ handleStop() break; case "play": - handlePlay(cmd.songs) + handlePlayOrNext("play", cmd.songs) + break; + case "next": + handlePlayOrNext("next", cmd.songs) break; case "upvoted": handleVotes("up", cmd.songs) -- cgit v1.2.3