Skip to content

Commit

Permalink
fix(HLS): Ensure playlist.stream_info.resolution exists before use
Browse files Browse the repository at this point in the history
  • Loading branch information
rlaphoenix committed Apr 14, 2024
1 parent 1db8944 commit 5c7c080
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions devine/core/manifests/hls.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ def to_tracks(self, language: Union[str, Language]) -> Tracks:
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 {})
))
Expand Down

0 comments on commit 5c7c080

Please sign in to comment.