Thanks to all for the switch and fallback suggestions, but they don't work
either.  The reason is that since the live stream never goes blank, the
switch (or the fallback) never gets triggered.
It seems that LS executes a liq until any kind of track play condition is
true, and then waits until the end of the track to re-evaluate the .liq.
If the track never ends, then none of the switches or fallbacks ever
activate again.

What I'm trying to do doesn't seem to me to be too unusual.  I want to
stream never-ending live data for one hour and then return to my normal
playlist. (track_sensitive=true on the way in, and track_sensitive=false on
the way out).  LS can easily start the stream at the correct time, but
apparently LS can't stop the stream from within the .liq.  I must
externally instruct LS to skip, probably by creating a cron-job to telnet a
skip.stream at the end of the hour.  This I feel is a kludgy and inelegant
workaround.

On Thu, Nov 23, 2017 at 8:03 PM, Stephan Hoppe <[email protected]>
wrote:

> Restated...
> I want 13h to happen. Whatever song that is playing at the time should
> finish, then the remote stream should play for an hour.  At 14h, the remote
> stream should stop and the regular playlist should resume.
>
>
>
>
>
> On Thu, Nov 23, 2017 at 7:59 PM, Stephan Hoppe <[email protected]>
> wrote:
>
>> You're right - track_sensitive does work ... on the way out.  The
>> problem is that it is also is track_sensitive on the way in, meaning my
>> regular playlist inelegantly cuts out right at 13h on the dot (which is not
>> desired) and then cuts out on the dot at 14h (which is desired)
>>
>> You said earlier that playlist.once could do the trick.  Can it still?
>>
>>
>>
>>
>>
>> On Thu, Nov 23, 2017 at 7:52 PM, neralex <[email protected]> wrote:
>>
>>> You could also try to add track_sensitive=false in the switch() function:
>>>
>>> "track_sensitive (anything that is either bool or ()->bool – defaults to
>>> true): Re-select only on end of tracks."
>>>
>>> http://liquidsoap.fm/doc-1.3.3/reference.html#switch
>>>
>>> myplaylist = switch(track_sensitive=false,[
>>> ({13h00-14h00},remote_stream), ({true}, myplaylist) ] )
>>>
>>>
>>> Am 23.11.2017 um 18:55 schrieb Stephan Hoppe:
>>>
>>>> Wow, that great! Thanks!
>>>> Can you show me how I would integrate playlist_once() into the .liq bit
>>>> I've already provided?
>>>>
>>>> thx
>>>> s
>>>>
>>>> On Thu, Nov 23, 2017 at 6:49 PM, neralex <[email protected] <mailto:
>>>> [email protected]>> wrote:
>>>>
>>>>     Hi!
>>>>
>>>>     playlist.once() does this job. It cuts the playlist after the
>>>> end-time.
>>>>
>>>>     http://liquidsoap.fm/doc-1.3.3/reference.html#playlist_once
>>>>     <http://liquidsoap.fm/doc-1.3.3/reference.html#playlist_once>
>>>>
>>>>     Cheers
>>>>
>>>>
>>>>     Am 23.11.2017 um 13:45 schrieb Stephan Hoppe:
>>>>
>>>>         Hi:
>>>>
>>>>         I want to cut into my regularly playing playlist each day at a
>>>>         certain time and play a remote stream (that is never blank -
>>>>         it's always playing something) for just one hour ... after which
>>>>         I want to fallback to my regular playlist again.
>>>>
>>>>         myplaylist = playlist("/home/user/playlist.m3u")
>>>>         remote_stream = input.http("http://remote_stream
>>>>         <http://remote_stream>")
>>>>         output.dummy(fallible=true, remote_stream)
>>>>         myplaylist = switch([ ({13h00-14h00},remote_stream), ({true},
>>>>         myplaylist) ] )
>>>>
>>>>         Using the bit of .liq above, remote_stream comes on at/after 13h
>>>>         as it should, but then it plays forever.  How to get it to stop
>>>>         and fall back to myplaylist at 14h, please?
>>>>
>>>>         Thanks,
>>>>         S
>>>>
>>>>
>>>>         ------------------------------------------------------------
>>>> ------------------
>>>>         Check out the vibrant tech community on one of the world's most
>>>>         engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>>>
>>>>
>>>>
>>>>         _______________________________________________
>>>>         Savonet-users mailing list
>>>>         [email protected]
>>>>         <mailto:[email protected]>
>>>>         https://lists.sourceforge.net/lists/listinfo/savonet-users
>>>>         <https://lists.sourceforge.net/lists/listinfo/savonet-users>
>>>>
>>>>
>>>>     ------------------------------------------------------------
>>>> ------------------
>>>>     Check out the vibrant tech community on one of the world's most
>>>>     engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>>>     _______________________________________________
>>>>     Savonet-users mailing list
>>>>     [email protected]
>>>>     <mailto:[email protected]>
>>>>     https://lists.sourceforge.net/lists/listinfo/savonet-users
>>>>     <https://lists.sourceforge.net/lists/listinfo/savonet-users>
>>>>
>>>>
>>>>
>>>>
>>>> ------------------------------------------------------------
>>>> ------------------
>>>> Check out the vibrant tech community on one of the world's most
>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Savonet-users mailing list
>>>> [email protected]
>>>> https://lists.sourceforge.net/lists/listinfo/savonet-users
>>>>
>>>>
>>> ------------------------------------------------------------
>>> ------------------
>>> Check out the vibrant tech community on one of the world's most
>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>> _______________________________________________
>>> Savonet-users mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/savonet-users
>>>
>>
>>
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to