Hi. i run Radio Mandarine in France with Liquidsoap for autodj music programs, 
plus Airtime for the shows twice a day;
I've build a ls_script file, and when I check it, I get the following error :   
"Line 109, char 19 before "=": Parse error".
I'm searching what's wrong since a few days, but I don't find it. 

What I want to do is :
- random playlist music (timed playlists during the day)
- one jingle each 4 songs (waiting for the end of the current track)
- one clock jingle on top of each hour (waiting for the end of the current 
track) ; each hour has its special clock jingle ;
- pubs1 : sponsoring playlist at 10 mn of each hour (waiting for the end of the 
current track)
- pubs2 : sponsoring playlist at 30 mn of each hour (waiting for the end of the 
current track)
- pubs3 : sponsoring playlist at 50 mn of each hour (waiting for the end of the 
current track)

Then,  a fallback when there's a live stream and the final fallback with 
Airtime shows.

Could someone look at my script and tell me which lines may be modified ? Thank 
you very much in advanced. Sorry for my poor english.
Jean--Noel

Here's my Airtime / Liquidsoap script :


%include "library/pervasives.liq"
%include "/etc/airtime/liquidsoap.cfg"

set("log.file.path", log_file)
set("log.stdout", true)
set("server.telnet", true)
set("server.telnet.port", 1234)

queue = request.queue(id="queue", length=0.5)
queue = cue_cut(queue)
queue = audio_to_stereo(queue)

pypo_data = ref '0'
web_stream_enabled = ref false
stream_metadata_type = ref 0
station_name = ref ''
show_name = ref ''

%include "ls_lib.liq"

server.register(namespace="vars", "pypo_data", fun (s) -> begin pypo_data := s 
"Done" end)
server.register(namespace="vars", "web_stream_enabled", fun (s) -> begin 
web_stream_enabled := (s == "true") string_of(!web_stream_enabled) end)
server.register(namespace="vars", "stream_metadata_type", fun (s) -> begin 
stream_metadata_type := int_of_string(s) s end)
server.register(namespace="vars", "show_name", fun (s) -> begin show_name := s 
s end)
server.register(namespace="vars", "station_name", fun (s) -> begin station_name 
:= s s end)

# Play user requests if there are any,
# otherwise one of our playlists,
# and the default file if anything goes wrong.securite = 
playlist("home/mp3/securite/")

securite = playlist("/home/mp3/securite/")
reveil = playlist(mode="random",reload=14400,"/home/mp3/reveil/")
matin = playlist(mode="random",reload=14400,"/home/mp3/matin/")
apres_midi = playlist(mode="random",reload=14400,"/home/mp3/apres_midi/")
soiree = playlist(mode="random",reload=21600,"/home/mp3/soiree/")
nuit = playlist (mode="random",reload=21600,"/home/mp3/nuit")
jingles = playlist(mode="random","/home/mp3/jingles/")
pubs1 = playlist(mode="random","/home/mp3/pubs1/")
pubs2 = playlist(mode="random","/home/mp3/pubs2/")
pubs3 = playlist(mode="random","/home/mp3/pubs3/")
clock00 = single("home/mp3/tops_horaires/top_00h.mp3")
clock01 = single("home/mp3/tops_horaires/top_01h.mp3")
clock02 = single("home/mp3/tops_horaires/top_02h.mp3")
clock03 = single("home/mp3/tops_horaires/top_03h.mp3")
clock04 = single("home/mp3/tops_horaires/top_04h.mp3")
clock05 = single("home/mp3/tops_horaires/top_05h.mp3")
clock06 = single("home/mp3/tops_horaires/top_06h.mp3")
clock07 = single("home/mp3/tops_horaires/top_07h.mp3")
clock08 = single("home/mp3/tops_horaires/top_08h.mp3")
clock09 = single("home/mp3/tops_horaires/top_09h.mp3")
clock10 = single("home/mp3/tops_horaires/top_10h.mp3")
clock11 = single("home/mp3/tops_horaires/top_11h.mp3")
clock12 = single("home/mp3/tops_horaires/top_12h.mp3")
clock13 = single("home/mp3/tops_horaires/top_13h.mp3")
clock14 = single("home/mp3/tops_horaires/top_14h.mp3")
clock15 = single("home/mp3/tops_horaires/top_15h.mp3")
clock16 = single("home/mp3/tops_horaires/top_16h.mp3")
clock17 = single("home/mp3/tops_horaires/top_17h.mp3")
clock18 = single("home/mp3/tops_horaires/top_18h.mp3")
clock19 = single("home/mp3/tops_horaires/top_19h.mp3")
clock20 = single("home/mp3/tops_horaires/top_20h.mp3")
clock21 = single("home/mp3/tops_horaires/top_21h.mp3")
clock22 = single("home/mp3/tops_horaires/top_22h.mp3")
clock23 = single("home/mp3/tops_horaires/top_23h.mp3")
live_start = single("/home/mp3/live_start/live_start.mp3")
live_stop = single("/home/mp3/live_stop/live_stop.mp3")
live = input.http("http://88.191.138.162:9502/";)

music = fallback([ queue,
                                   switch([({ 05h-09h }, reveil),
                                                   ({ 09h-13h }, matin),        
                        
                                                   ({ 13h-17h }, apres_midi),   
                                                        
                                                   ({ 17h-23h }, soiree),       
              
                                                   ({ 23h-05h }, nuit)]),
                                   securite])

# Add the normal jingles
timed_jingles = random(weights = [1, 4],[jingles, music])
musicjingles = fallback(track_sensitive=true, [timed_jingles,music])

# And the clock jingles
timed_top = fallback([ queue,
                       switch([({ 0h0m0s },clock00),
                               ({ 1h0m0s },clock01),
                               ({ 2h0m0s },clock02),
                               ({ 3h0m0s },clock03),
                               ({ 4h0m0s },clock04),
                               ({ 5h0m0s },clock05),
                               ({ 6h0m0s },clock06),
                               ({ 7h0m0s },clock07),
                               ({ 8h0m0s },clock08),
                               ({ 9h0m0s },clock09),
                               ({ 10h0m0s },clock10),
                               ({ 11h0m0s },clock11),
                               ({ 12h0m0s },clock12),
                               ({ 13h0m0s },clock13),
                               ({ 14h0m0s },clock14),
                               ({ 15h0m0s },clock15),
                               ({ 16h0m0s },clock16),
                               ({ 17h0m0s },clock17),
                               ({ 18h0m0s },clock18),
                               ({ 19h0m0s },clock19),
                               ({ 20h0m0s },clock20),
                               ({ 21h0m0s },clock21),
                               ({ 22h0m0s },clock22),
                               ({ 23h0m0s },clock23)])

musicjinglestops = fallback(track_sensitive=true, [times_top,musicjingles])

#Add some sponsoring messages :
pubs = fallback([ queue,
                                  switch([({10m0s},pubs01),
                                          ({30m0s},pubs02),
                                          ({50m0s},pubs03)])
                                                  
radio = fallback(track_sensitive=true, [pubs,musicjinglestops])

# Add the ability to relay live shows. Skip if blank                    
default = fallback(track_sensitive=true, [live_start,live,live_stop,radio])

s = fallback(track_sensitive=true, [queue,default])
s = normalize (s

------------------------------------------------------------------------------
Magic Quadrant for Content-Aware Data Loss Prevention
Research study explores the data loss prevention market. Includes in-depth
analysis on the changes within the DLP market, and the criteria used to
evaluate the strengths and weaknesses of these DLP solutions.
http://www.accelacomm.com/jaw/sfnl/114/51385063/
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to