My coding is terrible but I have made an attempt at creating a liq file that is 
able to capture day based on def and fun commands.  Can you help me get the 
rest of the way there?
1.  Specifically the syntax I used below to capture test_date.2.  I will have 
31 m3u files, one for each day of the month.  How do I add the switch and a 
named variable that defines the playlist file name for that day?

#!/usr/bin/liquidsoap# Log dirset("log.file.path","/tmp/liquidsoap_bible.log")
#Capture day value via test_date#Please validate my syntax?def test_date(~day) 
fun () -> get_process_output("date +%d")=="#{day}\n"end

#I will have 31 playlists based on potential days in a month.  Can you help me 
with the next two lines to create a switch that will play the m3u of the 
day?#Please validate my syntax?switch([(test_date(day=10),day10)])myplaylist = 
playlist(mode="normal","/home/day10.m3u")myplaylist = 
# Some jinglesjingles = playlist("/home/jingles")
# If something goes wrong, we'll play thissecurity = single("say:We're 
currently experiencing technical difficulties.  Please try again later.")
# Start building the feed with musicradio = myplaylist# Now add some 
jinglesradio = random(weights = [1, 4],[jingles, radio])# And finally the 
securityradio = fallback(track_sensitive = false, [radio, security])
 # Stream it outoutput.icecast(%mp3(bitrate=24),  host = "localhost", port = 
8000,  password = 
for the day",genre="Bible",url="";, radio)

Date: Sat, 17 Sep 2016 10:08:42 -0500
Subject: Re: [Savonet-users] Custom play based on day of each month

Hi Walter,
For complex scheduling purposes, have you looked at writing your own scheduling 
code? This is usually the most convenient way to hook liquidsoap up with 
complex scheduling programs. You can basically use whatever language/tools you 
are more convenient with and use request.dynamic in your liquidsoap script to 
fetch the next song to play according to your schedule.
2016-09-16 8:57 GMT-05:00 Walter York <>:

Any assistance would be greatly appreciated...

Date: Fri, 2 Sep 2016 16:37:44 -0400
Subject: [Savonet-users] Custom play based on day of each month

I would like to play the Proverb and Psalm of the day rotating back and forth.
The mp3 files are named accordingly...
All of these files are in the same folder including the rest of the Bible.
On every first day of the month, I'd like to play ...Psalm_001.mp3 and 
...Proverbs_001.mp3Every second day of the month, I'd like to play 
...Psalm_002.mp3 and ...Proverbs_002.mp3
Would someone please provide the logic to create the config file for the above 
request so I don't have to create separate playlists for each day?  Thank you 
so much for your time in advance...                                          

Savonet-users mailing list                      



Savonet-users mailing list

Savonet-users mailing list                      
Savonet-users mailing list

Reply via email to