retry streamlink
This commit is contained in:
parent
8475d928a2
commit
a6a7488438
15
stream.py
15
stream.py
@ -327,12 +327,15 @@ class MainHandler(tornado.web.RequestHandler):
|
||||
|
||||
async def handle_stream(self, handler, redir):
|
||||
upstream = None
|
||||
try:
|
||||
logger.info(handler.proxy)
|
||||
streams = handler.proxy.stream().streams(handler.upstream)
|
||||
except Exception as e:
|
||||
logger.info(e)
|
||||
else:
|
||||
streams = None
|
||||
for i in range(5):
|
||||
try:
|
||||
streams = handler.proxy.stream().streams(handler.upstream)
|
||||
except Exception as e:
|
||||
logger.info(e)
|
||||
else:
|
||||
break
|
||||
if streams is not None:
|
||||
for key in reversed(streams):
|
||||
stream = streams.get(key)
|
||||
if hasattr(stream, "url"):
|
||||
|
Loading…
Reference in New Issue
Block a user