mirror of
https://github.com/home-assistant/core.git
synced 2025-05-05 22:49:17 +00:00
Return target duration of 1 when no segments (#40518)
This commit is contained in:
parent
5658abfaca
commit
e85d1deddd
@ -84,7 +84,7 @@ class StreamOutput:
|
|||||||
"""Return the max duration of any given segment in seconds."""
|
"""Return the max duration of any given segment in seconds."""
|
||||||
segment_length = len(self._segments)
|
segment_length = len(self._segments)
|
||||||
if not segment_length:
|
if not segment_length:
|
||||||
return 0
|
return 1
|
||||||
durations = [s.duration for s in self._segments]
|
durations = [s.duration for s in self._segments]
|
||||||
return round(max(durations)) or 1
|
return round(max(durations)) or 1
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user