Asking for help: Can’t get news switch to work #4004
-
For playing the news at full and half hour, I would like to
I came up with the following code, because the commented-out For some reason, I can’t get it to work. I hear a very brief loudness drop, but no news play. The news file itself is requested, autocued, ready and all. # News
thread.when(predicate.activates({ 59m45s or 29m45s }), fun() -> playlist_nachrichten.reload())
#radio = smooth_add(duration=2., p=0., normal=radio, special=switch(id="news_switch", [(predicate.once({ 0m0s or 30m0s }), sequence([blank(duration=2.), playlist_nachrichten]))]))
radio = switch(
id="news_switch",
track_sensitive=false,
[
(predicate.activates({ 0m0s or 30m0s }), playlist_nachrichten),
({ true }, radio)
]
) If I use Anyone out there who can tell me what I’m doing wrong, and how I can achieve the desired result? Here is a typical part of the log (I’m using AzuraCast):
|
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 4 replies
-
Here, it's a job for radio = fallback(track_sensitive=false,[
switch(id="news_switch",[(predicate.activates({ 0m0s or 30m0s }), playlist_nachrichten)]),
radio
]) Should work with radio = fallback(track_sensitive=false,[
switch(id="news_switch",[(predicate.once({ 0m0s or 30m0s }), playlist_nachrichten)]),
radio
]) |
Beta Was this translation helpful? Give feedback.
-
Thanks for the suggestion, will try. |
Beta Was this translation helpful? Give feedback.
-
Phew. After searching and finding the LS docs not helpful at all, I found a hint in a 2013 AirTime forum post, and after only a few hours of frustrating experiments came up with this:
Seems to work well. AzuraCast users: Third input box in Edit Liquidsoap Config. ;-) And do your |
Beta Was this translation helpful? Give feedback.
-
What exactly does the "playlist_nachrichten" look like (settings)? One or two playlists? Is "news" correct in the script? Should it perhaps be "playlist_nachrichten"? Thanks for the answer. |
Beta Was this translation helpful? Give feedback.
Phew. After searching and finding the LS docs not helpful at all, I found a hint in a 2013 AirTime forum post, and after only a few hours of frustrating experiments came up with this: