savonet / liquidsoap

Liquidsoap is a statically typed scripting general-purpose language with dedicated operators and backend for all thing media, streaming, file generation, automation, HTTP backend and more.
http://liquidsoap.info
GNU General Public License v2.0
1.4k stars 129 forks source link

Feature request: ID for internal sources in random and rotate switches #3851

Open vitoyucepi opened 6 months ago

vitoyucepi commented 6 months ago

Is your feature request related to a problem? Please describe. Random and Rotate switch functions internally create two additional sources without setting their IDs, making it difficult to track what's actually happening in the logs.

2024/04/01 12:03:41 [schedule:3] Switch to monday_afternoon with forgetful transition.
2024/04/01 12:03:41 [monday_afternoon:3] Switch to on_track.2.
2024/04/01 12:03:41 [switch.3:3] Switch to Music_A.

Describe the solution you'd like I'd like to see what happens inside the Random and Rotate switches.

Describe alternatives you've considered I don't know, maybe hide intermediate levels altogether.

Additional context N/A

toots commented 6 months ago

Thanks for pointing that out. I've been annoyed by this for a while too: we need a way to identify sources that are created as part of an operator. I'll see what I can do for 2.3.x.

rmens commented 5 months ago

Was working on a small log parser today to get some insights about how much our fallback input is used and noticed that it couldn't be looked up by ID. This would be great to have!