Hi guys,
On Fri, Apr 20, 2012 at 10:20 PM, Alexandru Matei
<[email protected]> wrote:
>> Yup! If you can be sure that the reload time is larger than the
>> playlist's length and shorter than the time it will be reloaded next,
>> then it works indeed.
>
> I don't undestand the explanation above. If it's larger than the
> playlist's length, why use reload time? It reloads anyway because it
> ends up. I also don't understand the second part of the explanation.
Romain meant that the reload time should be larger than the expected
play time of the playlist. For example, you use the first playlist for
1h30-3h30, that is 2 hours long. If you set a reload time of 3 hours,
the playlist could be reloaded before the next day but after the end
of the 2 hours time slot. However, it won't work exactly this way: the
reloading event is triggered when the playlist is used, so it would
happen when you come back to that playlist.
The transition-based solution is good, though.
> I wanted to make a single transition function and to use
> source.id(source) and execute
> server.execute("#{source.id(a)}.reload")
> But it's not that simple. Almost everytime source id is empy_xxxx,
> src_xxxx, even if I gave an explicit id for all sources/playlists used.
> Why?
Probably because the sources called playlist in your switch are not
directly the playlists, but are possibly wrapped in various operators.
In that case, having just one transition and using it for all sources
should work, but can't be based on ids. Instead, you can pass a first
parameter to your transition that gives the id of the actual playlist:
you transition function would be of the form f(id,before,after) and
you partially apply it for each instance of it, ie.
transitions=[f("pl1"),f("pl2")...] where those strings are the ids
that should be used for reloading.
> And another thing... I would expect that if I have a playlist and I
> mention an explicit id, let's say playlist_with_id, in server-telnet
> mode to have the command playlist_with_id.reload. But ... I was wrong.
> If the playlist's file name is playlist.txt the available command is
> playlist(dot)txt.reload. So... why give an id? From my point if view
> this a very strange behavior. Or maybe I'm missing something.
What you see here is the default id, based on the filename. If you set
an id by hand, ie. use playlist(id="foo","playlist.txt"), then you'll
see the id. The only exception is when there is a conflict, the final
id might be foo.1, foo.2, etc. Note that the variable names used for
the source have nothing to do with the id: if you do
playlist_0130_0330 = playlist("playlist.txt"), the id will not be
"playlist_0130_0330".
Hope this helps,
David
------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users