On 20.04.2012 07:40, Romain Beauxis wrote:
> 2012/4/19 Alexandru Matei<[email protected]>:
>> Hi!
>    Hi Alexandru!
>
>> I make a script which containts the lines below.
>>
>> playlists_switch = switch([
>>                          ({1h30-3h30},   playlist_0130_0330),
>>                          ({3h30-5h},     playlist_0330_0500),
>>                          ...
>>                          ({23h-23h30},   playlist_2300_2330),
>>                          ({23h30-1h30},  playlist_2330_0130)
>>                          ])
>>
>> #icecast output
>> icecast_output =
>> fallback(id="fallback_live_playlists",track_sensitive=true,replay_metadata=false,[playlists_switch,safe_playlist])
>>
>> I'd like when the switch chooses, let's say, the brach {1h30-3h30} the
>> associated playlist, playlist_0130_0330, to start from the beginning.
>> Using the script in the form below if one playlist lasts long than it's
>> predicted  time, the following will be delayed. This not a big problem.
>> The problem is that the next day there will be playlists that will begin
>> from the middle of something, and those playlists have to be listened
>> from the first track to have a meaning.
>>
>> How can I achieve such a behavior?
> 2012/4/19 Sascha<[email protected]>:
>> i just started with LS some weeks ago, so i'm a newbie,
>> but i think you can manage this with the "reload" parameter of Playlist like
>>
>> playlist_0130_0330 = playlist(reload = 10800, "playlist.m3u")
>>
>> 10800 does a reload of the list after 3h (60*60*3)

> 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.

Hi!

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. Sorry.
> Another more possible way to do that is to define transitions on the
> switches/fallbacks that do nothing but call playlist.reload through
> the telnet/server interface on the source that is being left when
> switching sources. This will automatically reload the playlist of the
> left source and place it at its beginning so that next time it is
> selected, it will start from the beginning.
>
> Does that make sense?
> Romain
This makes perfect sense. I like this approach.
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?
So, I have to make a specific transition function for all the sources.

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.

Alexandru.

------------------------------------------------------------------------------
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

Reply via email to