From 5c7c080a34a9109dd9318057152643379afb6abf Mon Sep 17 00:00:00 2001 From: rlaphoenix Date: Sun, 14 Apr 2024 03:15:11 +0100 Subject: [PATCH] fix(HLS): Ensure playlist.stream_info.resolution exists before use --- devine/core/manifests/hls.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/devine/core/manifests/hls.py b/devine/core/manifests/hls.py index d665c31..f361c80 100644 --- a/devine/core/manifests/hls.py +++ b/devine/core/manifests/hls.py @@ -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 {}) ))