Hi Raphael:

I too am pretty new to Liquidsoap.  Good question, I am curious too.  I'm 
looking forward to seeing the experts' replies to your question!!!

Kevin


On 2013-04-16, at 6:09 AM, Raphaël BOLLEN <[email protected]> wrote:

> Hi everyone,
> 
> I'm new to liquidsoap and have a problem switching sources against time and 
> weekdays.
> 
> When started, the script selects the right source in the schedule, but when 
> running, the script 
> doesn't change the source and continues playing the first selected source, 
> what am I missing?
> 
> The script I use:
> 
> #!/usr/local/bin/liquidsoap
> 
> default = mksafe(single("/home/sysadmin/radio/sounds/default.ogg"))
> 
> day     = playlist("/home/sysadmin/radio/playlists/day/")
> night   = playlist("/home/sysadmin/radio/playlists/night/")
> tests   = audio_to_stereo(playlist("/home/sysadmin/radio/playlists/tests/"))
> 
> clock   = 
> audio_to_stereo(single("/home/sysadmin/radio/sounds/bip_horaire.wav"))
> 
> # streams
> campus = input.http("http://164.15.20.12:8000/stream.mp3";)
> youfm = input.http("http://193.190.194.78:8000/listen.pls";)
> libellule = audio_to_stereo(input.http("http://94.23.221.174:8000/stream";))
> 
> lundi = switch([
>               ({5h-6h30}, day),
>                 ({6h30-13h}, campus),
>                 ({13h-19h}, libellule),
>                 ({19h-24h}, youfm),
>                 ({0h-3h}, night),
>                 ({3h-4h}, tests),
>                 ({4h-5h}, night)
>                 ])
> 
> mardi = switch([
>                 ({5h-6h30}, day),
>                 ({6h30-11h}, campus),
>                 ({11h-20h}, libellule),
>                 ({20h-24h}, youfm),
>                 ({0h-3h}, night),
>                 ({3h-4h}, tests),
>                 ({4h-5h}, night)
>                 ])
> 
> mercredi = switch([
>               ({5h-6h30}, day),
>                 ({6h30-11h}, campus),
>                 ({11h-20h}, youfm),
>                 ({20h-24h}, libellule),
>                 ({0h-3h}, night),
>                 ({3h-4h}, tests),
>                 ({4h-5h}, night)
>                 ])
> 
> jeudi = switch([
>               ({5h-6h30}, day),
>                 ({6h30-12h}, campus),
>                 ({12h-16h}, youfm),
>                 ({16h-18h}, campus),
>                 ({18h-22h}, youfm),
>                 ({22h-24h}, libellule),
>                 ({0h-3h}, night),
>                 ({3h-4h}, tests),
>                 ({4h-5h}, night)
>                 ])
> 
> vendredi = switch([
>               ({5h-6h30}, day),
>                 ({6h30-11h}, campus),
>                 ({11h-18h}, youfm),
>                 ({18h-24h}, libellule),
>                 ({0h-3h}, night),
>                 ({3h-4h}, tests),
>                 ({4h-5h}, night)
>                 ])
> 
> samedi = switch([
>               ({5h-6h30}, day),
>                 ({6h30-11h}, campus),
>                 ({11h-17h}, youfm),
>                 ({17h-22h}, libellule),
>                 ({22h-24h}, youfm),
>                 ({0h-3h}, night),
>                 ({3h-4h}, tests),
>                 ({4h-5h}, night)
>                 ])
> 
> dimanche = switch([
>               ({5h-6h30}, day),
>                 ({6h30-9h}, campus),
>                 ({9h-18h}, youfm),
>                 ({18h-22h}, libellule),
>                 ({22h-24h}, campus),
>                 ({0h-3h}, youfm),
>                 ({3h-4h}, tests),
>                 ({4h-5h}, night)
>                 ])
> 
> radio = switch([
>                 ({1w}, lundi),
>                 ({2w}, mardi),
>                 ({3w}, mercredi),
>                 ({4w}, jeudi),
>                 ({5w}, vendredi),
>                 ({6w}, samedi),
>                 ({7w}, dimanche)
>                 ])
> 
> # And the clock jingle
> radio = add([mksafe(radio), switch([({0m0s},clock)])])
> 
> # fallback
> full = fallback(track_sensitive=false,
>               [radio,
>               default])
> 
> output.jack(full)
> 
> 
> Thanks in advance.
> 
> --
> Raphaël.
> 
> ------------------------------------------------------------------------------
> Precog is a next-generation analytics platform capable of advanced
> analytics on semi-structured data. The platform includes APIs for building
> apps and a phenomenal toolset for data science. Developers can use
> our toolset for easy data analysis & visualization. Get a free account!
> http://www2.precog.com/precogplatform/slashdotnewsletter
> _______________________________________________
> Savonet-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/savonet-users


------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to