mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-24 04:05:39 +01:00
hls: parsem3u dont crash when EXT-X- is one
This commit is contained in:
parent
68f300ec05
commit
31575abc51
@ -135,7 +135,10 @@ def parsem3u(data):
|
||||
elif l.startswith("#EXT-X-ENDLIST"):
|
||||
break
|
||||
elif l.startswith("#EXT-X-"):
|
||||
globdata.update(dict([l[7:].strip().split(":", 1)]))
|
||||
line = [l[7:].strip().split(":", 1)]
|
||||
if len(line[0]) == 1:
|
||||
line[0].append("None")
|
||||
globdata.update(dict(line))
|
||||
elif l.startswith("#EXTINF:"):
|
||||
dur, title = l[8:].strip().split(",", 1)
|
||||
streaminfo['duration'] = dur
|
||||
|
Loading…
Reference in New Issue
Block a user