From 14430e79eff8c2353b23b4c8aa5a3ce2a019e821 Mon Sep 17 00:00:00 2001 From: Jerry Yan <792602257@qq.com> Date: Mon, 8 Apr 2019 21:11:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=EF=BC=9A=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E6=9F=A5=E7=9C=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Common.py | 3 ++- WebMain.py | 1 + liveDownloader.py | 6 +++++- static/index.html | 25 ++++++++++++++++++++++++- static/index.js | 28 +++++++++++++++++++++++++--- 5 files changed, 57 insertions(+), 6 deletions(-) diff --git a/Common.py b/Common.py index 69abff7..00138de 100644 --- a/Common.py +++ b/Common.py @@ -25,7 +25,8 @@ updateTime = "" forceStopDownload = False forceNotBroadcasting = False -forceNotUpload = False +forceNotUpload = True +forceNotEncode = True uploadQueue = queue.Queue() encodeQueue = queue.Queue() diff --git a/WebMain.py b/WebMain.py index 46107eb..ff679b5 100644 --- a/WebMain.py +++ b/WebMain.py @@ -74,6 +74,7 @@ def getAllStats(): "forceNotBroadcasting": Common.forceNotBroadcasting, "forceStopDownload": Common.forceStopDownload, "forceNotUpload": Common.forceNotUpload, + "forceNotEncode": Common.forceNotEncode, } }}) diff --git a/liveDownloader.py b/liveDownloader.py index dba5b45..703c844 100644 --- a/liveDownloader.py +++ b/liveDownloader.py @@ -49,8 +49,12 @@ def download(url): def encode(): global isEncode + appendEncodeStatus("Encode Daemon Start") while True: i = encodeQueue.get() + if forceNotEncode: + modifyLastUploadStatus("设置了不编码,所以[{}]不会编码".format(i)) + continue if os.path.exists(i): isEncode = True appendEncodeStatus("Encoding >{}< Start".format(i)) @@ -69,7 +73,7 @@ def upload(date=datetime.strftime(datetime.now(), "%Y_%m_%d")): appendUploadStatus("Upload Daemon Starting") while True: if forceNotUpload: - modifyLastUploadStatus("设置了不上传,所以不会上传了") + modifyLastUploadStatus("设置了不上传,所以[{}]不会上传了".format(i)) i = uploadQueue.get() continue if isinstance(i, bool): diff --git a/static/index.html b/static/index.html index 37e2266..e84c01b 100644 --- a/static/index.html +++ b/static/index.html @@ -5,7 +5,7 @@
CPU使用率 | ++ | % | +
内存使用率 | ++ | /(%) | +
磁盘使用率 | ++ | /(%) | +