Hi Gilles,

Forgive me if I lack understanding but isn’t there a method for doing this 
already built-in to Liquidsoap without the crontab that you have suggested?

My two main sources are ‘Electronica’ and ‘Ambient’ and my script builds both 
of these by putting together tracks in a specific sequence from multiple 
randomised directories (the sequence starts with a jingle and then places fresh 
tracks with older ones, finalises the sequence with an archived track. This 
sequence loops until all tracks are exhausted and the playlist starts again - 
this is important for keeping the playlists sounding new and managed as I 
constantly add new music. Both sources work this way).

The two sources look like this

# Electronica Playlist Rotation
electronica = rotate(weights = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 
1, 1, 1],
[elid, elfre, elgen, elfre, elgen, elfre, elgen, elfre, elgen, elid, elfre, 
elgen, elfre, elgen, elfre, elgen, elfre, elgen, elarc])

# Ambient Playlist Rotation
ambient = rotate(weights = [1, 1, 1, 1, 1, 1, 1, 1, 1],
[ambid, ambfre, ambgen, ambfre, ambgen, ambfre, ambgen, ambfre, ambgen])


For some reason, everything I’ve tried so far (playlist.once / reload_mode= / 
reload=) fails to make the playlist reload properly when it’s scheduled to do 
so in the switch. The tracks play perfectly in sequence when there is no switch 
setup. But with the switch added to the script, the best that I am able to get 
is a randomised playlists which are inserted into the stream when the switch 
tells it to, but they are not reloaded. For instance, when once playlist has 
ended, the next one begins with a track that is mid-way through … and this 
track is the same one that was playing before the last switch occurred. I can’t 
get it to reload afresh when then switch tells it to.



- - -
I prefer to use encrypted email.
My public key fingerprint is 77CC 9087 0A92 F55D 75A3  660B 68F2 1FA9 B26E CAC7

> On 21 Apr 2018, at 10:12 pm, Gilou <contact+...@gilouweb.com> wrote:
> 
> Le 21/04/2018 à 06:27, Damian a écrit :
>> 
>> Hi,
>> 
>> I realise that there has been quite a lot of discussion in previous
>> threads about getting playlists to reload when they are scheduled in
>> a switch. I have been trying to get my test script below to reload a
>> playlist so that it starts on time and at the beginning of a randomised
>> playlist with each scheduled switch.
>> 
>> But each time the playlist is scheduled to start, it does not refresh
>> the playlist and start from the beginning. I have my test schedule below
>> set to switch to a new playlist every 5 minutes (this is just so I can
>> monitor the transitions for now, but I’ll obviously extend the play time
>> length later). What seems to happen is that the playlist doesn’t start
>> afresh. It continues from where it left off previously. I’ve tried
>> adding a reload time of 6 minutes to each playlist (so that the
>> playlists will have reloaded before the next scheduled switch is due)
>> but this doesn’t seem to work either.
>> 
>> Can anyone tell me the best or easiest way to get the switch to start a
>> new playlist so that it is randomised and at the beginning of the
>> playlist on each scheduled switch time?
> 
> The way I do it is by actually reloading it through the socket before it
> starts...
> I have a crontab doing:
> echo -e "mylist.reload\r\nquit\r\n" | socat - UNIX-CONNECT:radio.sock
> 10 minutes or so before the playlist starts.
> 
> Might be a bit ugly, but combined with check_next, it's an easy way to
> have something random (and updated) while avoiding repetitions!
> 
> Gilles
> 
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org <http://slashdot.org/>! 
> http://sdm.link/slashdot <http://sdm.link/slashdot>
> _______________________________________________
> Savonet-users mailing list
> Savonet-users@lists.sourceforge.net 
> <mailto:Savonet-users@lists.sourceforge.net>
> https://lists.sourceforge.net/lists/listinfo/savonet-users 
> <https://lists.sourceforge.net/lists/listinfo/savonet-users>

Attachment: signature.asc
Description: Message signed with OpenPGP

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Savonet-users mailing list
Savonet-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to