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