Keep 1 extra segment around after playlist removal (#46310)
* Keep 1 extra segment around after playlist removal * Remove segments length check
This commit is contained in:
parent
9bc3c6c130
commit
acde33dbbc
2 changed files with 4 additions and 3 deletions
|
@ -6,7 +6,7 @@ from aiohttp import web
|
|||
|
||||
from homeassistant.core import callback
|
||||
|
||||
from .const import FORMAT_CONTENT_TYPE
|
||||
from .const import FORMAT_CONTENT_TYPE, NUM_PLAYLIST_SEGMENTS
|
||||
from .core import PROVIDERS, StreamOutput, StreamView
|
||||
from .fmp4utils import get_codec_string, get_init, get_m4s
|
||||
|
||||
|
@ -77,7 +77,7 @@ class HlsPlaylistView(StreamView):
|
|||
@staticmethod
|
||||
def render_playlist(track):
|
||||
"""Render playlist."""
|
||||
segments = track.segments
|
||||
segments = track.segments[-NUM_PLAYLIST_SEGMENTS:]
|
||||
|
||||
if not segments:
|
||||
return []
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue