Le Thursday 08 May 2008 10:50:35 Marcin Lewandowski, vous avez écrit :
> Hi,

        Hi !

> I put some metadata in annotate string, to e.g. configure smart cross-fade.

Yes, that's how to do it.

> Could you recommend me any solution that could be used to automatically
> shutdown liquidsoap but AFTER song finishes? I mean, for example: I put
> in annotate string variable like "shutdown=1". Then I have something in
> my script, that shutdowns liquidsoap nicely after or before this song is
> played and runs some external script?
>
> The goal is to make possibility to restart my system with new
> configuration and avoid situation where stream is shut down in the
> middle of track.

I see two possibilities:
 * Also add the length of the track to the metadata, if it is not already 
there (it's in the standard metadata for ogg files while it has to be 
computed, and takes time, for mp3..), and fire a delayed task that will be 
executed after the length of the song. You usually do that using add_timeout.
 * Add the shutdown=1 to the next song, which would also be blank, and fire 
the shutdown there.

Of course, you would monitor the metadata by using a on_metadata with an 
appropriate function.


Romain
-- 
There is a land far, far away
Where there's no night, there's only day
Look into the book of life and you will see
That there's a land far, far away

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to