Closed originalfoo closed 6 years ago
Good idea! Built-in filters could work, but I don't have an idea about some useful filters except day/night. The check is performed every ~10s. The CSL radio system does not expose the event when a new song plays. Evil hacks everywhere.
Implemented as suggested. Documentation updated.
In the docu, you use A, B, C, etc to improve clarity - why not do same in to the config file itself?
For example:
If you find a string in the conditions (instead of an object), treat it as named reference to a value in the
filters
object. You could have a page listing the most commonly used filters (day, night, raining, etc) or even have those filters bundled as part of the main mod (they can be overridden on station-by-station basis by creating a filter of same name in a config file).With this approach, filters could potentially be added to individual audio files too (eg. this is my daytime collection, but only play this particular track/advert/chat if it's raining).
Also, I assume the check is done only when choosing next track to play and not constantly while radio is on (ie. it won't impair performance)?