From 2554b537e866414f97031554aef4e88c64d2651c Mon Sep 17 00:00:00 2001 From: Jerry Yan <792602257@qq.com> Date: Tue, 24 Sep 2019 09:18:40 +0800 Subject: [PATCH] =?UTF-8?q?=E9=98=B2=E6=8A=96~~~~~~~~=20=E6=9C=80=E8=BF=91?= =?UTF-8?q?=E4=B8=BB=E6=92=AD=E8=80=81=E6=98=AF=E6=8E=89=E7=BA=BF=EF=BC=8C?= =?UTF-8?q?=E9=81=BF=E5=85=8D=E8=AF=AF=E4=BC=A0=EF=BC=88B=E7=AB=99?= =?UTF-8?q?=E5=88=A0=E7=A8=BF=E4=BB=B6=E8=A6=812=E4=B8=AA=E7=A1=AC?= =?UTF-8?q?=E5=B8=81=E4=BA=86TAT=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- liveDownloader.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/liveDownloader.py b/liveDownloader.py index ae7c683..e7b52cd 100644 --- a/liveDownloader.py +++ b/liveDownloader.py @@ -107,7 +107,6 @@ def upload(): continue if not Common.forceNotEncode: os.remove(i) - sleep(1800) # 防抖,避免主播因特殊情况下播导致直接投递了 i = Common.uploadQueue.get() Common.appendUploadStatus("Upload Daemon Quiting") @@ -158,8 +157,10 @@ def run(): return awakeEncode() _count = 0 + _firstDown = False while True: if Common.api.isLive and not Common.forceNotBroadcasting: + _firstDown = True if not Common.forceNotDownload: awakeDownload() awakeUpload() @@ -175,8 +176,13 @@ def run(): continue time.sleep(5) else: + if _firstDown: + sleep(1800) # 防抖,避免主播因特殊情况下播导致直接投递了 + _firstDown = False + continue if not isEncode and not isDownload: Common.uploadQueue.put(True) + _firstDown = False isEncode = True isDownload = True time.sleep(60)