1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-24 04:05:39 +01:00

tv4play: crash when there was no subtitle

This commit is contained in:
Johan Andersson 2013-01-15 17:42:49 +01:00
parent 8bb19793fb
commit e3228813b5

View File

@ -921,14 +921,13 @@ class Tv4play():
options.live = True
streams = {}
sa.pop(len(sa)-1)
for i in sa:
stream = {}
stream["uri"] = i.find("base").text
stream["path"] = i.find("url").text
streams[int(i.find("bitrate").text)] = stream
if i.find("mediaFormat").text != "smi":
stream = {}
stream["uri"] = i.find("base").text
stream["path"] = i.find("url").text
streams[int(i.find("bitrate").text)] = stream
if len(streams) == 1:
test = streams[list(streams.keys())[0]]
else: