1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-24 04:05:39 +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: if parse.path.find("m3u8") > 0:
streams = hlsparse(i["url"]) streams = hlsparse(i["url"])
for n in list(streams.keys()): if streams:
yield HLS(copy.copy(options), streams[n], n) for n in list(streams.keys()):
yield HLS(copy.copy(options), streams[n], n)
elif parse.path.find("f4m") > 0: elif parse.path.find("f4m") > 0:
match = re.search(r"\/se\/secure\/", i["url"]) match = re.search(r"\/se\/secure\/", i["url"])
if not match: if not match: