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

svtplay: dont crash when it cant find any streams

In some cases we cant download any videos. when they are only
provided for flash users and not iOS users.
This commit is contained in:
Johan Andersson 2012-12-23 18:04:10 +01:00
parent 6e23d6db54
commit eb0b488b10

View File

@ -888,7 +888,10 @@ class Svtplay():
stream["url"] = i["url"]
streams[int(i["bitrate"])] = stream
if len(streams) == 1:
if len(streams) == 0:
log.error("Can't find any streams.")
sys.exit(2)
elif len(streams) == 1:
test = streams[streams.keys()[0]]
else:
test = select_quality(self.options, streams)