Hi David,

Actually, what I want to do is to check to see if a particular server is
alive, and if it is not, skip to the next item in the playlist that is
not on that server, without involving any local playlist items, as there
are none for my station.

Here's a section of my playlist:

http://audiodef.com/audio/twpdv3.ogg
http://www.archive.org/download/TimeDroneWithJackHertz10January2011/td2011_01_10_3.ogg
http://ia600605.us.archive.org/15/items/AudiodefAtTheElectro-music.comSpringEquinox2010RadioConcert/speq2010_3.ogg
http://www.archive.org/download/MomentsInHistory/mih3.ogg
http://www.archive.org/download/Ulising/ulising_5.ogg
http://www.archive.org/download/AudiodefElectro-musicSummerSolstice2010/fueled_ex3.ogg
http://www.archive.org/download/AudiodefElectro-musicSummerSolstice2010/st_inst3.ogg
http://www.archive.org/download/OldTapeFromAudiodefsPast/eclectic1_3.ogg
http://electro-music.com/forum/download.php?id=28797
http://electro-music.com/forum/download.php?id=28741
http://electro-music.com/forum/download.php?id=28475
http://electro-music.com/forum/download.php?id=28366
http://electro-music.com/forum/download.php?id=28367
http://www.archive.org/download/Complex_Silence_19/01_One.mp3
http://www.archive.org/download/Complex_Silence_19/02_Two.mp3
http://www.archive.org/download/cdm003/01-Episode9-SongOfTheForest.ogg
http://www.archive.org/download/cdm003/02-Episode10-TheJourney.ogg

Let's say electro-music.com goes down. I want my LS script to scan ahead
a track or two to check to see whether the electro-music.com is alive.
If the script determines electro-music.com is down, when the playlist
comes to any item from electro-music.com, it will immediately skip it.
Repeat ad infinitum. Should electro-music.com prove to be alive, those
items will not be skipped.

Or perhaps this could be done: when electro-music.com proves to be down,
my script could read the contents of my playlist and write a second,
temporary playlist that has all the items from electro-music.com
removed. The script continues to ping electro-music.com, and when it
comes back online, the temporary playlist is deleted and the script
reverts to its main playlist.

The problem with using an entirely different fallback playlist, even if
the fallback is a playlist of remote files, is the same problem will
remain: what if a particular site in the fallback list is down?

I hope that clarifies what I want to accomplish, and I hope it can be
accomplished!

Thanks,
Damien

On 05/26/12 10:55, David Baelde wrote:
> Hi Damien,
>
> I'm not sure what's so annoying when the remote server is down. If you
> have a common fallback like fallback([playlist(remote),localstuff])
> then it would switch to localstuff when the remote playlist fails to
> get something from the server.
>
> If you want more control based on whether the server is alive or not,
> you could have a switch between local stuff and remote files, with a
> condition that enables local stuff only when the remote server seems
> down.
>
> In more details, you have to write a function (all in liquidsoap, or
> with a mix of liquidsoap and shell or whatever script language) that
> regularly checks whether the server seems alive. Then set a bool
> reference to true if the server is dead. Then instead of
> playlist(remote) you could have
>   switch([
>     ({!server_dead},localstuff),
>     ({not(!server_dead)},playlist(remote))
>   ])
>
> Note tat this won't stop the playlist to try to get one file ready in
> advance, but it's only one file so it should be okay.
>
> Hope this helps,


-- 
My music: http://audiodef.com
Synthetronica: http://synthetronica.com
Male survivors of domestic violence: http://abusedmen.org


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to