fix(HLS): Ensure playlist.stream_info.resolution exists before use

This commit is contained in:
rlaphoenix 2024-04-14 03:15:11 +01:00
parent 1db8944b09
commit 5c7c080a34
1 changed files with 2 additions and 2 deletions

View File

@ -131,8 +131,8 @@ class HLS:
codec.split(".")[0] in ("dva1", "dvav", "dvhe", "dvh1")
for codec in (playlist.stream_info.codecs or "").lower().split(",")
) else Video.Range.from_m3u_range_tag(playlist.stream_info.video_range),
width=playlist.stream_info.resolution[0],
height=playlist.stream_info.resolution[1],
width=playlist.stream_info.resolution[0] if playlist.stream_info.resolution else None,
height=playlist.stream_info.resolution[1] if playlist.stream_info.resolution else None,
fps=playlist.stream_info.frame_rate
) if primary_track_type is Video else {})
))