防抖~~~~~~~~
最近主播老是掉线,避免误传(B站删稿件要2个硬币了TAT)
This commit is contained in:
parent
a0824785e5
commit
2554b537e8
@ -107,7 +107,6 @@ def upload():
|
|||||||
continue
|
continue
|
||||||
if not Common.forceNotEncode:
|
if not Common.forceNotEncode:
|
||||||
os.remove(i)
|
os.remove(i)
|
||||||
sleep(1800) # 防抖,避免主播因特殊情况下播导致直接投递了
|
|
||||||
i = Common.uploadQueue.get()
|
i = Common.uploadQueue.get()
|
||||||
Common.appendUploadStatus("Upload Daemon Quiting")
|
Common.appendUploadStatus("Upload Daemon Quiting")
|
||||||
|
|
||||||
@ -158,8 +157,10 @@ def run():
|
|||||||
return
|
return
|
||||||
awakeEncode()
|
awakeEncode()
|
||||||
_count = 0
|
_count = 0
|
||||||
|
_firstDown = False
|
||||||
while True:
|
while True:
|
||||||
if Common.api.isLive and not Common.forceNotBroadcasting:
|
if Common.api.isLive and not Common.forceNotBroadcasting:
|
||||||
|
_firstDown = True
|
||||||
if not Common.forceNotDownload:
|
if not Common.forceNotDownload:
|
||||||
awakeDownload()
|
awakeDownload()
|
||||||
awakeUpload()
|
awakeUpload()
|
||||||
@ -175,8 +176,13 @@ def run():
|
|||||||
continue
|
continue
|
||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
else:
|
else:
|
||||||
|
if _firstDown:
|
||||||
|
sleep(1800) # 防抖,避免主播因特殊情况下播导致直接投递了
|
||||||
|
_firstDown = False
|
||||||
|
continue
|
||||||
if not isEncode and not isDownload:
|
if not isEncode and not isDownload:
|
||||||
Common.uploadQueue.put(True)
|
Common.uploadQueue.put(True)
|
||||||
|
_firstDown = False
|
||||||
isEncode = True
|
isEncode = True
|
||||||
isDownload = True
|
isDownload = True
|
||||||
time.sleep(60)
|
time.sleep(60)
|
||||||
|
Reference in New Issue
Block a user