Hi Guillaume! 2013/2/27 Guillaume Ferland <guilla...@ustream.ca>: > Hello, > > I am looking for a way to access the information about the next track that > will be played by liquidsoap, without resorting to doing the scheduling > outside liquidsoap. > > I do know that liquidsoap is preparing the track a little in advance of > playing it, and from my understanding that delay can be modified (by example > to prepare the track 1 min in advance) but I cannot find a way to access > metadata or other info about that next track. > > Any help appreciated. > > Snippet of config: > > mysongs = playlist(reload=36000,"playlists/1/songs.m3u") > mysongshigh = playlist(reload=36000,"playlists/1/songshigh.m3u") > # Some jingles > jingles = playlist(reload=6000,"playlists/1/jingles.m3u") > # If something goes wrong, we'll play this > security = audio_to_stereo(single("30sec.mp3")) > > # Start building the feed with music > radio = mysongs > > radio = random(weights = [4,1], [radio, mysongshigh]) > > # Now add some jingles > radio = rotate(weights = [1, 2],[jingles, radio]) > # And finally the security > radio = fallback(track_sensitive = false, [radio, security])
The most convenient way to grab the next track is through telnet/server commands. For instance, playlists sources have a next command that looks like this: <playlist ID>.next [playing] /path/to/current.mp3 /path/to/next.mp3 ... You can call these commands from within a script as well using server.execute. However, it might be a little bit tricky to catch the next track because of switches, for instance between live and regular schedule. If you really need a finer-grained schedule, it is usually a good idea to implement your own scheduling through request.dynamic. Such scheduling does not have to be outside of your liquidsoap script, it can also be written in plain liquidsoap code.. 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_feb _______________________________________________ Savonet-users mailing list Savonet-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/savonet-users