Hi Benoït, On Thu, May 15, 2008 at 11:52 PM, Benoït Leudet <[EMAIL PROTECTED]> wrote: > It works well except that I was surprised to see that the script is > called three times (two times if length=30.) and I would like that only > one title is sent because I want to manage the playlist a more precise way.
As you noticed, you can play on the parameters of the queue to change that behaviour. If you set the length to less than the default_duration, then only one track will be prepared in advance in the queue. I'm not sure what happens if you set the length to 0. Anyway, it is good that a least one track is prepared in advance: so even if a track ends unexpectedly something else is ready for playout. I don't think you should try to get below these two calls in a row -- there will be only one call at a time after that the queue is initialized. If you need more control, there are several options. First, you can use on_track() to perform actions when a track is actually played -- you could delay some actions from the request.dynamic() script to the on_track() handler. You can also get the duration of the queued files (cf. file.duration()) if you need to be precise. Somebody already did that, and could maybe report examples and opinions. Hope that helps, -- David ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Savonet-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/savonet-users
