1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-24 12:15:40 +01:00

tv4play: print error message when there is no streams

This commit is contained in:
Johan Andersson 2014-01-15 19:21:05 +01:00
parent dcdfbd1e4e
commit ec8fe2a5b9

View File

@ -60,7 +60,10 @@ class Tv4play(Service):
streams[int(i.find("bitrate").text)] = stream
elif i.find("mediaFormat").text == "smi":
subtitle = i.find("url").text
if len(streams) == 1:
if len(streams) == 0:
log.error("Can't find any streams")
sys.exit(2)
elif len(streams) == 1:
test = streams[list(streams.keys())[0]]
else:
test = select_quality(options, streams)