Hi,
On Fri, Oct 26, 2012 at 9:30 PM, Guy Tarazy <[email protected]> wrote:
> Hey Guys.
>
> My scheduled LS script is written to play playlists on given hours and
> days from folders i set..example:
>
> singles = playlist(mode='randomize',reload=1,reload_mode="rounds",
> "/srv/tranceilmusic/music/singles")
>
> and schedule it like that - >
>
>
> ({ (0w) and 07h-12h}, singles),
>
>
> How do i go about setting a live stream from different station to act as a
> playlist so i can broadcast it when i want?
>
> I want to broadcast a certain URL stream on a given day and time..what
> should i write in the "singles = " ?...
>
You should use input.http("http://url_of_the_stream").
> Also...is there a way to define a weekday of the month to the schedule?
> like.. 2w2? (tuesday of 2'nd week)
>
There is no direct way to do this in Liquidsoap but you can use the date
function from unix to build a function which will choose the good day (and
do almost whatever you want in this way). For instance,
# Function returning true if this is a good day and false otherwise
def good_day() =
# Name of the current day
day_name = get_process_output("date +%A")
# Remove trailing \n
day_name = string.replace(pattern="\n",fun (_) -> "", day_name)
# Number of current week
week = int_of_string(get_process_output("date +%U"))
# Return true on tuesday every four week
(day_name == "Tuesday") and (week mod 1 == 0)
end
out = switch([(good_day, good_day_playlist), ...])
++
Sam.
------------------------------------------------------------------------------
The Windows 8 Center - In partnership with Sourceforge
Your idea - your app - 30 days.
Get started!
http://windows8center.sourceforge.net/
what-html-developers-need-to-know-about-coding-windows-8-metro-style-apps/
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users