From 9b69e90021c6d0e8a11ce6488edbceee64e40756 Mon Sep 17 00:00:00 2001 From: Jerry Yan <792602257@qq.com> Date: Wed, 1 Apr 2020 11:33:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=8A=95=E7=A8=BF=E6=97=A5?= =?UTF-8?q?=E6=9C=9F=E5=8F=AF=E8=87=AA=E5=AE=9A=E4=B9=89=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Common.py | 4 +++- liveDownloader.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Common.py b/Common.py index 1cd8f71..fc79d23 100644 --- a/Common.py +++ b/Common.py @@ -34,6 +34,8 @@ config = { "dlO": True, # 下播延迟投稿 "dly": 30, + # 短的时间的格式 + "sdf": "%Y%m%d", "enc": "ffmpeg -i {f} -c:v copy -c:a copy -f mp4 {t} -y" } doCleanTime = datetime.fromtimestamp(0) @@ -77,7 +79,7 @@ def resetDelay(): def doDelay(): global delay - if -120 < getTimeDelta(datetime.now(), delay) < 120: + if -120 < getTimeDelta(datetime.now(), delay) < 60: delay = datetime.fromtimestamp(0) return True return False diff --git a/liveDownloader.py b/liveDownloader.py index 78893e2..9b6a91a 100644 --- a/liveDownloader.py +++ b/liveDownloader.py @@ -54,7 +54,7 @@ def encode(): def upload(): - date = datetime.strftime(datetime.now(), "%Y_%m_%d") + date = datetime.strftime(datetime.now(), Common.config["sdf"]) Common.appendUploadStatus("Upload Daemon Starting") i = Common.uploadQueue.get() while True: