Hi Azat!

2013/1/31 Azat Galiev <[email protected]>:
> Hey, guys! Good day! I have a problem: I have function:
>
> def stop_after_current =
>     ...
> end
>
> It's return a predicate ({true} or {false}). When it return a true, all
> right, liquidsoap hasn't to do anything. But if it return a false, i need to
> stop current playlist. So I write this code:
>
> nonstop = at(stop_after_current, nonstop)
>
> But it's work only once - on the start. If after some tracks function will
> return false, it does not recognize this. Ok, so I write another code:
>
> nonstop = switch(track_sensitive=false, [(stop_after_current, nonstop),
> ({true}, blank(id="", duration=20.0))])
>
> But It's doesn't work too! Despite track_sensitive! Ok, so I write code
> again =)
>
> nonstop = fallback([request.queue("blank"), nonstop])
>
> Then via telnet I push file with silence. But it doesn't play!! Something
> cuts the silence in the following code:
>
> nonstop = smart_crossfade(mksafe(rotate(weights=[3, 1], [music, jingles])))
>
> But what is the mistakes in the first and second variants? Thank you in
> advance!
>
> P.S. Sorry for my English.

No problem!

Good try :-) I think this one was close to what you need:

> nonstop = switch(track_sensitive=false, [(stop_after_current, nonstop), 
> ({true}, blank(id="", duration=20.0))])

However, even if your function returns true, it is possible that the
nonstop source will not be played because it is not available..

Would you mind sharing a bit more of your script, for instance a
minimal script with an actual source for nonstop and perhaps a more
detailed description of what you expect?

Romain

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to