Hi, I have a very functional setup with liquidsoap that I am very happy with but I have a question about a time-based switch I have implemented with playlist.once.
I'm sure that my use of playlist.once is legitimate. - It reads tracks from a txt file in sequence. - The playlist is a top 30 count down (as voted by listeners). - It plays in sequence from number 30 to number 1 and does not loop back to number 30 when finished. playlist.once works fine for this. It plays all the tracks and then switches to the default playlist. The issue stems from the fact that I can never be sure how long it will take to play 30 tracks. It changes weekly and so will the playlist time-length. What I want to know is how to setup the switch so that it allows all of the 30 tracks to play and then switches back to default only when these are done (not based on switch time). Currently it works because I allow more time than is possible for 30 tracks to play (6 hours) but I don't think this is a very elegant solution and there is still room for errors to occur because the playlist will begin playing again if it is accidentally reloaded in this time. I've included the fundamentals of simple script below. Looking forward to any advice I can get. samples = playlist(mode="randomize", reload_mode = "rounds", reload=1, "/uploads/samples") uploads = playlist.once(reload_mode = "watch”,”/uploads/test.txt") default = samples test = uploads def trans(old,new) old = fade.final(duration=10.,old) source.skip(new) new = fade.initial(duration=0.,new) sequence([old,new]) end radio = switch(track_sensitive=false,transitions=[trans,trans],[ ({5w15h-5w21h},test), ({true},default)]) radio = mksafe(radio) _______________________________________________ Savonet-users mailing list Savonet-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/savonet-users