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