Hi, [I'm replying in english in case that information can be useful to others.]
You knocked at the right door: if one tool can fit your bill, it's liquidsoap. I'm not sure whether one of us is looking for a hired mission like that. But we can still discuss how to do it: it's valuable for the list, and I think you'll find out that you can easily do it yourself -- possibly after that we add a couple of things in liquidsoap. You need a new playlist every hour (24 playlists a day). Several options here. Either you create a huge switch with 24 children, each having prepared a playlist; but it's ugly and I doubt that it does the job correctly. Or you create one playlist() configured to reload every hour. You have several kinds of playlists: (1) played in order with crossfading, (2) played randomly with crossfading and (3) played in order without crossfading. Plus, the third kind should not be interrupted after an hour, contrary to the first two. It's getting more tricky. First idea. It sounds that when you reload the playlist, you change the config of the playlist() node: when you start a type (3) you set reloading to "every round", otherwise to "every hour", and you set the mode to randomize or normal depending on the type of playlist. The playlist class has support for on-the-fly changing of these parameters, but it's currently not connected to anything. It could be set via metadata for example, or via the server. Finally, metadata can already be used to affect the crossfading behaviour. That could be elegant, and the new stuff required in liquidsoap sounds reasonable. Second idea. You can have one playlist node per kind of playlist. Or even queues. The type (3) could correspond to a queue that you fill at the beginning of an hour where a mixtape should be played. It would then take over the rest, typically being first in a fallback(). Similarly for the straight playlist, which would be underneath a crossfading node. Finally, the randomized playlist would really be a playlist with reloading set to "every hour". Here, an external script called every hour is in charge of feeding the relevant queues if needed (push behaviour from liquidsoap's viewpoint). Another script is called by the third playlist (pull behaviour). It's even simpler if everything is a queue: you just feed the one you want at every new hour. Your script could randomize before feeding for type (1). A problem is to fill the right duration of music: either you compute it; or you over-estimate it and flush the queue after one hour; or you feed on-demand. The last option is the simplest but it all depends on where do your playlists come from. It all needs some more details, that involve you and us. I'll stop here for now, and see if other developpers have any opinion. I might hack a mockup soon, I'll keep you updated. In any case, I encourage you to install liquidsoap and start learning a bit. It won't be too painful, and as you can see we're keen to help on the list. Then if you love the project, you can still consider to ask us to open a donation thingy. Cheers, -- David
