Hi Alexandre,
You wrote:
> flux_courant = switch(track_sensitive=false,[({(3w or 5w or 7w) and
> (22h-22h47m52s)},playlist_semaine),({true},ubu_sons)])
When you write this it is important to understand that only one
playlist is ever created. The playlist is played at some point, then
left alone when ubu_sons is selected instead, then the same playlist
is played again.
What happens is that at first (say, on 3w) your
playlist(mode="normal") starts with the first audio file of your
playlist file. But the next time (on 5w) your playlist is still at the
same position as before.
That probably explains your problem. Now, how to fix it? Currently,
the index in the playlist is never reset in normal mode (this makes
sense as a default behaviour: if the list doesn't change you don't
want to restart from the beginning after a reload). The first solution
would be to give you a way to reset (or more generally to set) the
index in the list -- that would be a new server command.
The second solution doesn't require a change in liquidsoap, but some
advanced scripting: you can create a new fresh playlist on-the-fly
when you switch to the corresponding source, using transitions. I
haven't tried myself, there might be a few surprises there...
The last solution is to not use a playlist but a request.dynamic which
keeps track of the last time it was used, and resets its position in
the list if it was on a previous day. You can do it entirely
externally (using a bash/perl/.. script) or as a liquidsoap function,
in the spirit of playlist.once() in utils.liq.
Hope that helps,
--
David
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users