Replies: 1 comment
-
UPDATE: After spending a lot of time playing with the config, I managed to get it to work. The issue wasn't related to on_track (which seems to support multiple handlers BTW), but to the order of commands. I'm using the autocue crossfade (from LS) which sounds awesome. Now, I have a feeling that radio.crossfade clears all annotations and the "jingle=true" is not available anymore in the metadata, so I'm using the playlist_id as the condition for the jingle to play. I also added a 5-second delay to the handler so the jingle doesn't start right away with the track, but a bit later (this sounds better). The final code now looks like this:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to play some jingles on top of the stream when a specific track is pulled out of the queue. The idea is to have a jingle saying "This is a hot new tune" or whatever when the track is from the "New tracks" playlist.
After reading the liquidsoap book, I came up with the following solution:
This works fine. However, it completely breaks the metadata update engine (now_playing API keeps showing "Station offline" and the radio profile & public pages don't update either).
I suspect that another handler hooks to on_track() and when I put my on handler it overwrites the previous one.
I don't see anywhere in the liquidsoap.liq config file from Azuracast that could possibly be the cause. Maybe that's in the LS code, but I'm not familiar at all with OCaml and couldn't find anything by myself.
I'm wondering if that's possible to grab the current handler set for on_track and call it from within my own handler, but all my attempts failed so far.
Does anyone have an idea why setting on_track breaks the metadata update engine, and/or how to set my own on_track handler in a way that doesn't break things?
Azuracast version: Rolling Release #c694c81 (2024-05-05 0:26)
Liquidsoap version: Liquidsoap 2.2.5+git@5f6dad4b0
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions