Hi Jonathan,
There are several operators for dealing with tracks scheduling. switch is
the most powerful, you give it callbacks for each sources and it switches
between them depending on the callback's returned value. Then you have
fallback and rotate as you have noticed. The documentation should have
plenty of examples using them, in particular the cookbook I believe:
http://liquidsoap.fm/doc-1.2.0/cookbook.html
If your needs are more intricate, you might want to consider using
request.dynamic. In this case, you'd be writting your own track scheduler
and the operator would call it regularly to schedule and push new tracks to
the system.
Hope this helps,
Romain
2016-05-21 6:53 GMT-05:00 Jonathan <[email protected]>:
> Hello all. I have a script and I have been using this script for a while
> now and I was wondering if I can have 2 sources play jingles and some
> sort of promo as a switch operator and have it rotate when the time
> comes for the promos to start playing? For example, I have this.
> jingles = mksafe(playlist(reload=20000,"/home/kjsc/jingles"))
> radio = myplaylist
> radio = rotate(weights = [1, 3],[jingles, radio])
> Could I set that up to be used with some sort of promo playlist and have
> it play only the promo source when the time comes? Or do I just make a
> switch operator for that and just leave it like it is. I kind of want
> the promos playlist to randomize within the directory and if it had more
> than one file, I would want it to play only let's say for example, one
> out of three when that switch comes into play. If anyone can shed some
> light on this, it would be helpful. thanks.
>
>
>
> ------------------------------------------------------------------------------
> Mobile security can be enabling, not merely restricting. Employees who
> bring their own devices (BYOD) to work are irked by the imposition of MDM
> restrictions. Mobile Device Manager Plus allows you to control only the
> apps on BYO-devices by containerizing them, leaving personal data
> untouched!
> https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
> _______________________________________________
> Savonet-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/savonet-users
>
------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users