Hi,

Here is an easy hack on the top of my head: when you don't have a file
to return, have your script simply not return anything (do something
like a sleep for a minute). Then the playlist won't be tried again for
20 seconds (and this duration can be configured with the timeout
parameter). I know that this is quite nasty, but I can't think of a
simpler solution right now.

I think that the clean way to go would be to use a queue, and push the
requests in through telnet when you have some.

Cheers,

Sam.

On Wed, Apr 10, 2013 at 6:36 PM, Nicholas Vrtis <[email protected]> wrote:
> OK, I am trying to develop a web based DJ front end for LiquidSoap.  So far,
> everything is working well.  I've almost got the alpha stage code ready to
> put up on sourceforge.  But I ran into this problem.
>
> Liquidsoap 1.0.0 on Ubuntu.
>
> The server code that 'thelist' calls picks the  next song to play and just
> returns a single line with the file path/name to play.  This all works fine
> until the server runs out of songs to play.  When that happens, it returns
> an empty line.  What I expected is that LIquidsoap would just figure the
> source was gone, and drop to the single.  Hopefully, it would check back
> with the server when the single was getting to the end and ask it again.
> What actually happens is that it decides drops to the single, and then
> proceeds to beat up the server with LOTS of requests (Apache just chews up
> 100% cpu).
>
> What am I doing wrong?  How can I set it up so it asks the server, but not
> as frequently?
>
> default = single("/var/www/music/01 I Just Want to Make Love to You.mp3")
> thelist=playlist(mode="normal", reload=1, reload_mode="rounds",
> "http://bigserver.vrtisworks.home/webdj/index.php/webdj/getNextSongFileName";)
> # Here is the mic input
> mic_in = input.pulseaudio(id="");
> # And we make it switchable - if mic_on is true, our mic_in will be used
> mic_src=switch(track_sensitive=false, [({!mic_on},mic_in)])
> # mic input if it is on
> # otherwise our playlist,
> # and the default file if anything goes wrong.
> radio=fallback(track_sensitive=false,
>             [mic_src,
>             thelist,
>             default])
> output.pulseaudio(id='localAudio', radio)
>
>
> ------------------------------------------------------------------------------
> 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