Skip to content

Commit

Permalink
fix: fix compatibility with new Streamlink API
Browse files Browse the repository at this point in the history
  • Loading branch information
vzhd1701 committed Aug 23, 2023
1 parent 442f71f commit 90c3adc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion gridplayer/utils/stream_proxy/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def get_stream(self, url: str, protocol: str):
)
elif protocol == "hls":
self._log.debug("Stream is hls, using HLSProxyLive")
return HLSProxyLive(session_=self._session, url=url, force_restart=True)
return HLSProxyLive(session=self._session, url=url, force_restart=True)

raise RuntimeError(f"Cannot handle protocol {protocol}")

Expand Down
5 changes: 2 additions & 3 deletions gridplayer/utils/stream_proxy/wrappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,8 @@ def _proxify_hls_playlist(self, hls_playlist: M3U8) -> str:
hls_playlist.segments[i] = segment._replace(uri=segment_url)

if segment.map:
segment.map = segment.map._replace(
uri=self._proxify_url(segment.map.uri)
)
s_map = segment.map._replace(uri=self._proxify_url(segment.map.uri))
hls_playlist.segments[i] = hls_playlist.segments[i]._replace(map=s_map)

return m3u8_to_str(hls_playlist)

Expand Down

0 comments on commit 90c3adc

Please sign in to comment.