substract 86400 only when playlist start is at 00:00

This commit is contained in:
jonathan 2021-06-21 15:51:47 +02:00
parent 14f6efeb01
commit 7d139cce81

View File

@ -374,10 +374,14 @@ class GetSourceFromPlaylist:
when playlist not exists, or is not long enough,
generate a placeholder node
"""
current_time = get_time('full_sec') - 86400
current_time = get_time('full_sec')
if playlist.start == 0:
current_time -= 86400
# balance small difference to start time
if playlist.start is not None and isclose(playlist.start,
current_time, abs_tol=2):
current_time, abs_tol=1.5):
self.node = None
self.check_for_next_playlist(playlist.start)
else: