david
david

Reputation: 2587

Best Practice approach to schedule playlists using Liquidsoap (equeue alternative)

I'm in search of a best practice approach to schedule playlists using Liquidsoap. My current approach creates plenty of delays, hence not meeting the requirements for seamless playback.

Requirements:

My current implementation:

  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? Is it possible to clear an equeue w/o creating delays?

If there are "more correct" Liquidsoap features to achieve this, like a playlist (can I control when it is actualy played?) or request.dynamic (which is deprecated) instead of an equeue, please let me know.

Update: I'm currently using two queues: A and B. One minute before queue A should be playing I populate it with tracks (playlist). When it should be actually playing I turn up the volume. Then, one minute before queue B should be playing I populate this one. When it's actually time to be played I transition the volume from queue A > B. In theory this solution would be fine, but the issue here is that I'm not aware of a way that the queues pause until I turn up the volume. The tracks already seem to start playing at the very moment when the queue/playlist is filled.

Upvotes: 1

Views: 1264

Answers (1)

Martin
Martin

Reputation: 66

It's hard to tell without reading the complete script, but I'm sure it's not possible to pause a queue. At best you can remove an item via the server interface: if it's the currently playing item and it's alone in the queue, then it will stop that queue. You might be interested by the Beets examples, that discuss how an external program can populate sources.

To switch from playlists A to B, the Liquidsoap way is to populate B exactly when it's time and an operator like fallback will make the transition. See also fallback.skip.

Upvotes: 1

Related Questions