1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-23 19:55:38 +01:00

svtplay: don’t crash when we can’t get any HLS streams

This commit is contained in:
Johan Andersson 2015-02-01 09:09:37 +01:00
parent bcccfd3e86
commit 72f04e3b47

View File

@ -79,8 +79,9 @@ class Svtplay(Service, OpenGraphThumbMixin):
if parse.path.find("m3u8") > 0:
streams = hlsparse(i["url"])
for n in list(streams.keys()):
yield HLS(copy.copy(options), streams[n], n)
if streams:
for n in list(streams.keys()):
yield HLS(copy.copy(options), streams[n], n)
elif parse.path.find("f4m") > 0:
match = re.search(r"\/se\/secure\/", i["url"])
if not match: