Hello, while testing my new setup, I ran across something that is not a bug
per se, but comes close to it, and is no less a gotcha.

I have these playlist definitions:

pl = playlist.safe( reload_mode = "seconds", reload = 3600,
                    "~/e-tunes.net/playlist.lst" )

jingles = playlist.safe( reload_mode = "seconds", reload = 3600,
                         "~/e-tunes.net/jingles.lst" )

Now, It is possible, that one of those two (pretty much only "jingles") _may_
be an empty playlist. As you can see, both playlists are playlist.safe(), so
they should stream blank when there's no file in it.

Those two playlists are merged like this:

local = random( weights = [1, 1],
                [ pl, jingles ] )

Assume the rest is working correctly, this is what happens when I try to
start the liquidsoap:

2011/04/22 01:03:41 [playlist(dot)lst:3] Successfully loaded a playlist of 10 
tracks.
2011/04/22 01:03:41 [jingles(dot)lst:3] Loading playlist...
2011/04/22 01:03:41 [jingles(dot)lst:3] No mime type specified, trying 
autodetection.
2011/04/22 01:03:41 [jingles(dot)lst:3] Playlist treated as format
audio/mpegurl 2011/04/22 01:03:41 [jingles(dot)lst:3] Got an empty
list: keeping the old one. init: exception encountered during main
phase: Failure("Empty default playlist !")
exception: Failure("Empty default playlist !")

As You can see, playlist.lst is loaded just fine, but jingles.lst gives an
error, that liquidsoap cannot revover from. This is the stack trace:

exception: Failure("Empty default playlist !")
Raised at file "pervasives.ml", line 22, characters 22-33
Called from file "sources/playlist.ml", line 289, characters 4-49
Called from file "sources/playlist.ml", line 267, characters 6-52
Called from file "sources/playlist.ml", line 423, characters 4-23
Called from file "source.ml", line 369, characters 6-29
Called from file "operators/switch.ml", line 106, characters 9-45
Called from file "list.ml", line 69, characters 12-15
Called from file "source.ml", line 369, characters 6-29
Called from file "operators/switch.ml", line 106, characters 9-45
Called from file "list.ml", line 69, characters 12-15
Called from file "source.ml", line 369, characters 6-29
Called from file "operators/switch.ml", line 106, characters 9-45
Called from file "list.ml", line 69, characters 12-15
Called from file "source.ml", line 369, characters 6-29
Called from file "list.ml", line 69, characters 12-15
Called from file "source.ml", line 369, characters 6-29
Called from file "list.ml", line 69, characters 12-15
Called from file "source.ml", line 369, characters 6-29
Called from file "list.ml", line 69, characters 12-15
Called from file "source.ml", line 369, characters 6-29
Called from file "list.ml", line 69, characters 12-15
Called from file "source.ml", line 369, characters 6-29
Called from file "outputs/output.ml", line 129, characters 4-51
Called from file "source.ml", line 369, characters 6-29
Called from file "clock.ml", line 164, characters 15-40
Called from file "list.ml", line 57, characters 20-23
Called from file "clock.ml", line 162, characters 6-298
Called from file "clock.ml", line 331, characters 8-12
Called from file "list.ml", line 69, characters 12-15
Called from file "clock.ml", line 478, characters 6-40
Called from file "main.ml", line 513, characters 4-18
Called from file "dtools.ml", line 531, characters 16-20

Why is an exception raised, when I make the source safe?
Should the playlist be skipped as a whole, as liquidsoap implies at one
point?

2011/04/22 01:03:41 [jingles(dot)lst:3] Got an empty list: keeping the old one.

Anyways, happy Easter and hoping to be hearing from you.

Cheers,
--polemon

-- 
echo "[email protected]" | tr '[a-z]' '[n-za-m]'

------------------------------------------------------------------------------
Fulfilling the Lean Software Promise
Lean software platforms are now widely adopted and the benefits have been 
demonstrated beyond question. Learn why your peers are replacing JEE 
containers with lightweight application servers - and what you can gain 
from the move. http://p.sf.net/sfu/vmware-sfemails
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to