Skip track

This commit is contained in:
2024-06-19 19:45:36 +02:00
parent 917b57c586
commit a266e5d240
2 changed files with 17 additions and 7 deletions
+3 -3
View File
@@ -102,11 +102,11 @@ radio = fallback(id="switcher2", track_sensitive=false, [s, emergency])
# Set up an interactive control for skipping tracks
p = interactive.bool("Skip track", false)
def http_skip(_):
def http_skip(~protocol, ~data, ~headers, uri)=
radio.skip()
http.response(data="Skipped")
http.response(code=200,data="Skipped")
end
harbor.http.register.simple(port=54321, "/skip", http_skip)
harbor.http.register(port=54321,method="GET","/skip", http_skip)
# Function to process the request queue and skip the current track if requested