summaryrefslogtreecommitdiffstats
path: root/lass/2configs/radio
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2023-01-05 01:19:01 +0100
committerlassulus <lassulus@lassul.us>2023-01-05 01:19:01 +0100
commit0bbbfe153a0752bbe337bef1bac8c52aa285d4da (patch)
treeaeea1187dca3441ee0de6acdc72b22590d0c0546 /lass/2configs/radio
parent00226d6e2ae44dbbca0555f10ecb52acb56e6704 (diff)
l radio: set timeout for hooks, rename filter
Diffstat (limited to 'lass/2configs/radio')
-rw-r--r--lass/2configs/radio/radio.liq6
1 files changed, 3 insertions, 3 deletions
diff --git a/lass/2configs/radio/radio.liq b/lass/2configs/radio/radio.liq
index 70d316043..1366287a7 100644
--- a/lass/2configs/radio/radio.liq
+++ b/lass/2configs/radio/radio.liq
@@ -10,7 +10,7 @@ def stringify_attrs(attrs) =
out
end
-def filter_graveyard(req) =
+def filter_music(req) =
filename = request.filename(req)
if string.match(pattern = '.*/\\.graveyard/.*', filename) then
false
@@ -27,7 +27,7 @@ end
env = environment()
port = string.to_int(env["RADIO_PORT"], default = 8000)
-all_music = playlist(env["MUSIC"], check_next = filter_graveyard)
+all_music = playlist(env["MUSIC"], check_next = filter_music)
wishlist = request.queue()
tracks = fallback(track_sensitive = true, [wishlist, all_music])
tracks = blank.eat(tracks)
@@ -36,7 +36,7 @@ last_metadata = ref([])
def on_metadata(m) =
last_metadata := m
print("changing tracks")
- out = process.read(env["HOOK_TRACK_CHANGE"], env = m)
+ out = process.read(env["HOOK_TRACK_CHANGE"], env = m, timeout = 5.0)
print(out)
end
tracks.on_metadata(on_metadata)