2bc4 / streamlink-ttvlol

Streamlink Twitch plugin modified to work with the TTV.LOL API
BSD 2-Clause "Simplified" License
180 stars 6 forks source link

streamlink's m3u8 parser refactor breaks this plugin #53

Closed brian6932 closed 1 year ago

brian6932 commented 1 year ago

https://github.com/streamlink/streamlink/commit/2702c899c32a4d88c2edcce88f1b2e2974ab62a4

❯ streamlink twitch.tv/supinic best
[plugins.twitch][info] streamlink-ttvlol 121ce978-master
[plugins.twitch][info] Please report issues to https://github.com/2bc4/streamlink-ttvlol/issues
[cli][info] Found matching plugin twitch for URL twitch.tv/supinic
[cli][info] Available streams: audio_only, 160p (worst), 360p, 480p, 720p, 864p (best)
[cli][info] Opening stream: 864p (hls)
[cli][info] Starting player: mpv
[plugins.twitch][info] Will skip ad segments
Exception in thread Thread-TwitchHLSStreamWorker:
Traceback (most recent call last):
  File "~\scoop\apps\streamlink-nightly-lean-ttv-lol\current\Python\Lib\threading.py", line 1038, in _bootstrap_inner
    self.run()
  File "~\scoop\apps\streamlink-nightly-lean-ttv-lol\current\pkgs\streamlink\stream\segmented.py", line 238, in run
    for segment in self.iter_segments():
  File "~\scoop\apps\streamlink-nightly-lean-ttv-lol\current\pkgs\streamlink\stream\hls.py", line 440, in iter_segments
    self.reload_playlist()
  File "~\scoop\apps\streamlink-nightly-lean-ttv-lol\current\pkgs\streamlink\stream\hls.py", line 344, in reload_playlist
    playlist = self._reload_playlist(res)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "~\scoop\apps\streamlink-nightly-lean-ttv-lol\current\pkgs\streamlink\plugins\twitch.py", line 163, in _reload_playlist
    return load_hls_playlist(*args, parser=TwitchM3U8Parser, m3u8=TwitchM3U8)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "~\scoop\apps\streamlink-nightly-lean-ttv-lol\current\pkgs\streamlink\stream\hls_playlist.py", line 731, in load
    return parser(base_uri, **kwargs).parse(data)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "~\scoop\apps\streamlink-nightly-lean-ttv-lol\current\pkgs\streamlink\stream\hls_playlist.py", line 653, in parse
    parse_line(line)
  File "~\scoop\apps\streamlink-nightly-lean-ttv-lol\current\pkgs\streamlink\stream\hls_playlist.py", line 625, in parse_line
    segment = self.get_segment(self.uri(line))
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "~\scoop\apps\streamlink-nightly-lean-ttv-lol\current\pkgs\streamlink\plugins\twitch.py", line 121, in get_segment
    extinf: ExtInf = self.state.pop("extinf", None) or ExtInf(0, None)
                     ^^^^^^^^^^
AttributeError: 'TwitchM3U8Parser' object has no attribute 'state'. Did you mean: '_date'?
[cli][error] Try 1/1: Could not open stream <TwitchHLSStream ['hls', '...']> (Failed to read data from stream: Read timeout)
error: Could not open stream <TwitchHLSStream ['hls', '...']>, tried 1 times, exiting
[cli][info] Closing currently open stream...
2bc4 commented 1 year ago

Oops, been busy. I'll get on it.