From: Александр К. <ale...@ku...> - 2012-07-05 19:53:34
|
Hello, I try to implement following algorithm of playlists scheduling: there are two playlists: main and advertisements. liquidsoap in series get tracks from main playlist and after any 5th (for example) track insert track from ad playlist (but before 6th track from main playlist). now I use such construction: * s = playlist("#{main}")* * ads = playlist("#{ads}")* * random(weights=[1,4], [ads, s])* (also I does not want that ads overlay main stream: I want to insert ad between previous and next tracks from main playlist) I think that I should use queue management - create internal global counter and on "track played" event check counter and if (counter mod 5) == 0 then add to queue random track from ad playlist. I have tried to carefully consider this email archive and found some interesting thread: http://www.mail-archive.com/sav...@li.../msg02282.html is there simpler way for solve my problem? is there restrictions for liquidsoap version? I does not need cross-fade and I ask this question because I does not know liquidsoap language well :( Current config dynamicaly create stations and i should have an array of counters. How I can create associative array (dictionary) ? Sorry for my stupid (may be) questions, but I tried use google at first :) thx! |