How to play a song once at a specific time? #3762
-
I have this basically: workweek_end = single("E:\Music\Music Archive\Vangelis - Blade Runner OST 25th Anniversary Edition (2007)\CD 1\07 - Blade Runner Blues.mp3") I have figured this out by going through forum posts. Documentation is slim however. There is a cookbook but it explains little in terms of syntax. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 23 replies
-
Hi, @TomKranenburg. To play something once we have
In your case it’s:
|
Beta Was this translation helpful? Give feedback.
-
Hi @TomKranenburg, The desired behavior is described in the book on page 104. m = playlist("/tmp/test/music")
j = single("/tmp/test/j.mp3")
s = switch([
(predicate.once({4w20h and 14m-19m}), j),
({true}, m)
])
s.on_metadata(print)
output.dummy(s, fallible=true) For me, it works as expected and produces the following log Log
Note that the |
Beta Was this translation helpful? Give feedback.
Maybe try this: