Skipping tracks

This commit is contained in:
2024-04-24 19:58:23 +02:00
parent addc534c36
commit 2c50318f1c
+11
View File
@@ -83,6 +83,17 @@ let json.parse credentials = file.contents("/home/pi/Conjurer/icecast_credentia
radio = fallback(id="switcher2", track_sensitive=false, [cross_s, emergency])
thread.run(every=60., queue_processing)
p = interactive.bool("r1", false)
def check_skip()
if p.get() then
log.info("Skipping current track.")
radio.skip()
p.set(false)
end
end
thread.run(every=5., check_skip)
# Handle metadata events
handle_metadata = fun (m) -> begin