Hi Jorge ! Le Wednesday 01 August 2007 20:57:12 Jorge Ignacio Jiménez, vous avez écrit : > 4) if playlist-main.txt is corrupted or deleted and the radio station is > restarted, it does not load the playlist-rescue.txt :( > > > HOW CAN I FIX THE 4 POINT?
There is an hidden assumption in playlist.safe operator, which is that the playlist *must* work. So, even when not used, as soon at the stream source is evaluated, it fails to verify this and liq stops.. The quick solution is simply to replace playlist.safe by playlist in this case !! Furthermore, starting with 0.3.3 release, the normal install adds a utils.liq file, automatically loaded and usually located at either /usr/lib/liquidsoap or /usr/local/lib/liquidsoap, containing additionals operators. One of them is mksafe(source) -> source. As the name says, it returns an infaillible source from any source. As David said, playlist.safe is not a good operator. For instance, when doing my test, it failed even while there was audio files available, but, using "/tmp/" as the playlist, it took too long to find an available file.. So, I would recommend the following script for you: ---- #!/usr/local/bin/liquidsoap -v set log.dir = "/tmp" set socket = false stream = normalize(mksafe(playlist(mode="normal", "/path/to/playlist-main.txt"))) iffail = normalize(mksafe(playlist(mode="normal", "/path/to/playlist-rescue.txt"))) die = fallback(track_sensitive=false,[stream,iffail]) output = output.icecast.mp3(mount="test.mp3",bitrate=64,host="localhost", port=8000,user="xxx",password="xxxx",die) --- Of course, you may still use playlist.safe for the fallback source if you want to be sure that it is available. The above script may end-up delivering only silence in case both playlists aren't available.. Romain -- Oh what a competition But Jah is mi highest region Rocking trough revelation Chanting to Jah holy nation
