From f276523ef32fc4fc03e8d36e3a73d5bebfad30ba Mon Sep 17 00:00:00 2001 From: uvjustin <46082645+uvjustin@users.noreply.github.com> Date: Fri, 17 Jun 2022 11:07:08 +1000 Subject: [PATCH] Ignore in progress segment when adding stream recorder lookback (#73604) --- homeassistant/components/stream/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/stream/__init__.py b/homeassistant/components/stream/__init__.py index 19ef009a845..3766d981da5 100644 --- a/homeassistant/components/stream/__init__.py +++ b/homeassistant/components/stream/__init__.py @@ -510,7 +510,7 @@ class Stream: num_segments = min(int(lookback // hls.target_duration), MAX_SEGMENTS) # Wait for latest segment, then add the lookback await hls.recv() - recorder.prepend(list(hls.get_segments())[-num_segments:]) + recorder.prepend(list(hls.get_segments())[-num_segments - 1 : -1]) async def async_get_image( self,