On 21/04/16 12:23, Sarah Alawami wrote: > I believe it is. But I have not had to do this as of yet. I asked about > this last year when I thought I was going on a trip, but that didn't pan > out, the answer nor the trip. Lol! >> On Apr 18, 2016, at 7:09 PM, Adam Soffer <[email protected] >> <mailto:[email protected]>> wrote: >> >> I'd attempting to schedule a liquidsoap streaming source to be played >> at a specific date and time in the future. I believe this can be >> accomplished using the Liquidsoap |switch| command but I'm having >> trouble understanding the documentation for it described >> here: http://liquidsoap.fm/doc-1.2.0/reference.html#switch >> >> Is this possible using liquidsoap? I'd be nice if I could simply pass >> a timestamp.
I guess you can do that but if I understand correctly the switch
function is meant to do daily or more recurrent schedules, like day,
afternoon or night sources/playlists.
What I would suggest in this case is to set up a harbor so it can just
"be there" waiting for a source to connect whenever is sent to it.
this is a dirty example but should work as a proof of concept:
#!/usr/bin/liquidsoap
set("harbor.bind_addr","0.0.0.0")
emergency = single("jingles/outage.ogg")
playlist = playlist("audios/lista.m3u")
incoming = input.harbor("LIVE",port=8080,password="donthackme")
radio = fallback(track_sensitive=false, [incoming,playlist,emergency])
output.icecast(%vorbis, radio,mount="stream.ogg",host="localhost")
set("log.file.path","stream.log")
then you can connect to it with this command line
liquidsoap 'output.icecast(%vorbis, host="localhost",
port=8080,password="donthackme", mount="LIVE",
mksafe(playlist("scheduled_playlist.m3u")))'
or with a better written script run by a cron for instance.
Just note the LIVE mountpoint name because you need to use that same
mountpoint to connect the harbor.
and the "track_sensitive" function would help you to either wait for the
current playing song to finish or just interrupt it with the incoming
playlist
there's some good documentation here:
http://liquidsoap.fm/doc-svn/cookbook.html
hope it helps.
--
k054
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------------ Find and fix application performance issues faster with Applications Manager Applications Manager provides deep performance insights into multiple tiers of your business applications. It resolves application problems quickly and reduces your MTTR. Get your free trial! https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________ Savonet-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/savonet-users
