I'm trying to create a liq file that will play a playlist based on the 
particular day of the month.  I have extremely limited knowledge code wise...


Basically if its the first day of the month, I want to play day01.pls.  If its 
the second day of the month, I want to play day02.pls etc...


I'd like for it to repeat the playlist of the day till midnight then gracefully 
switch over to the next day's playlist.


I started a good attempt in the code below.  Can anyone help me accomplish 
this?  This is on a CentOS box.  Thank you so much for your time.



#!/usr/bin/liquidsoap

#Capture day value via test_date
def test_date(~day)
 fun () -> get_process_output("date +%d")=="#{day}\n"
end

#Define playlists by day

day01 = playlist("day01.pls")

day02 = playlist("day02.pls")

day03 = playlist("day03.pls")


switch([(test_date(day=01),day01)])
myplaylist = playlist(mode="normal","/home/day01.pls")
myplaylist = audio_to_stereo(myplaylist)



------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to