Thank you Nick! > How about 2 queues (A & B), and then using a switch to between the two. Then you could empty the one that's not being used with delaying the one that is playing.
I had a similar idea. And clearing the other queue after switching should indeed work. Ideally, I'd love to have a more straightforward approach with one queue/playlist only. But I have to think more about the queue A/B idea. > Which leads to the question of 'exactly' when do you want to switch? At a given time (and cut the song in the middle if necessary), or at the end of a song.? I need to switch at a *exact* given time. So yes there might be a cut or transition in the middle of the song. For example 10:00AM Playlist 1 is scheduled (duration 1,5h) 11:00AM Playlist 2 is scheduled So at 11:00AM Playlist 1 still has queued content, but it should switch to Playlist 2 at *exactly* 11:00AM. > Not sure how you are creating the list of songs. I'm controlling Liquidsoap via some Python Application, sending command using a Socket. > I moved my logic of what song to play next into Node (javascript). And created a dynamic queue. So Liquidsoap just calls a URL when it needs a new song). I understand in your case you don't require playing a song at a certain time, but only when Liquidsoap is needing some new track, right? So in your case Liquidsoap is sort of the "master", while your Node application is the "client" which only fulfills requests from LQS in a non-controlling manner. > Remember that Liquidsoap needs some 'time' to prepare a song. So with a dynamic queue there is a 'few seconds (I think 10 is the default)' of overlap. Oh that's some very impoertant information! THANK YOU. This explains why "seek in track" function requires my application to sleep for 10 seconds, before it works on a newly scheduled track at all. Best, david On Tue, 11 Feb 2020 at 21:39, Nicholas Vrtis <nick.vr...@gmail.com> wrote: > Two ideas I can think of. How about 2 queues (A & B), and then using a > switch to between the two. Then you could empty the one that's not being > used with delaying the one that is playing. Not sure if LiquidSoap > switches immediately, or at the end of a song. > > Which leads to the question of 'exactly' when do you want to switch? At a > given time (and cut the song in the middle if necessary), or at the end of > a song.? > > Not sure how you are creating the list of songs. I have trouble wrapping > my head around OCAML, so I moved my logic of what song to play next into > Node (javascript). And created a dynamic queue. So Liquidsoap just calls > a URL when it needs a new song). > > Remember that Liquidsoap needs some 'time' to prepare a song. So with a > dynamic queue there is a 'few seconds (I think 10 is the default)' of > overlap. > > Nick > > On Tue, Feb 11, 2020 at 2:06 PM David Trattnig <david.tratt...@gmail.com> > wrote: > >> Hi there, >> >> I'm in search of a best practice approach to schedule playlists using >> Liquidsoap. >> >> Requirements: >> * When a new playlist is due to be scheduled, it should remove all >> previously scheduled playlist-items. >> * It's important this approach is avoiding any delays when clearing >> previously queued playlist-items. >> >> My given implementation works the following: >> >> 1. Schedule a bunch of files (represent a playlist) by pushing them to an >> "equeue" >> 2. This queue starts playing >> 3. When the next timeslot is due, a new playlist cannot simply be queued, >> because it would only start >> *after* all tracks queued by the previous playlist are finished >> playing. Because of this, I'm removing >> all tracks of the previous playlist first using a Liquidsoap server >> script. This process is time-consuming >> and delays the timely execution of step 4.) >> 4. Schedule the new files by pushing them to an "equeue". >> >> How can I do this more elegantly? >> What are the correct Liquidsoap features to achieve this, >> like a "dynamic playlist" instead of an "equeue"? >> >> Thanks in advance, >> David >> >> >> _______________________________________________ >> Savonet-users mailing list >> Savonet-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/savonet-users >> > _______________________________________________ > Savonet-users mailing list > Savonet-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/savonet-users >
_______________________________________________ Savonet-users mailing list Savonet-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/savonet-users