Radio restart serverside

This commit is contained in:
2024-06-19 17:46:38 +02:00
parent 8a99ee7c99
commit 0f49cb89a3
4 changed files with 61 additions and 11 deletions
+7
View File
@@ -102,6 +102,13 @@ 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(_):
radio.skip()
http.response(data="Skipped")
end
harbor.http.register.simple(port=54321, "/skip", http_skip)
# Function to process the request queue and skip the current track if requested
def check_skip()
if p() then