Avoid loop in Boardcaster is not found and stop download
This commit is contained in:
parent
f4bc6d847d
commit
b61bd4c70c
@ -315,3 +315,8 @@ class downloader(XiGuaLiveApi):
|
||||
|
||||
|
||||
api = downloader(config["l_u"])
|
||||
|
||||
|
||||
def refreshDownloader():
|
||||
global api
|
||||
api = downloader(config["l_u"])
|
||||
|
@ -177,6 +177,9 @@ def run():
|
||||
_count_error = 0
|
||||
except Exception as e:
|
||||
Common.appendError(e.__str__())
|
||||
_count_error += 1
|
||||
if not Common.api.roomLiver:
|
||||
_count_error += 1
|
||||
if Common.forceStartEncodeThread:
|
||||
if not et.is_alive():
|
||||
et = threading.Thread(target=encode, args=())
|
||||
@ -190,3 +193,5 @@ def run():
|
||||
ut.setDaemon(True)
|
||||
ut.start()
|
||||
Common.forceStartUploadThread = False
|
||||
if _count_error>10:
|
||||
Common.refreshDownloader()
|
||||
|
Reference in New Issue
Block a user