添加投稿日期可自定义配置
This commit is contained in:
parent
5a72550598
commit
9b69e90021
@ -34,6 +34,8 @@ config = {
|
|||||||
"dlO": True,
|
"dlO": True,
|
||||||
# 下播延迟投稿
|
# 下播延迟投稿
|
||||||
"dly": 30,
|
"dly": 30,
|
||||||
|
# 短的时间的格式
|
||||||
|
"sdf": "%Y%m%d",
|
||||||
"enc": "ffmpeg -i {f} -c:v copy -c:a copy -f mp4 {t} -y"
|
"enc": "ffmpeg -i {f} -c:v copy -c:a copy -f mp4 {t} -y"
|
||||||
}
|
}
|
||||||
doCleanTime = datetime.fromtimestamp(0)
|
doCleanTime = datetime.fromtimestamp(0)
|
||||||
@ -77,7 +79,7 @@ def resetDelay():
|
|||||||
|
|
||||||
def doDelay():
|
def doDelay():
|
||||||
global delay
|
global delay
|
||||||
if -120 < getTimeDelta(datetime.now(), delay) < 120:
|
if -120 < getTimeDelta(datetime.now(), delay) < 60:
|
||||||
delay = datetime.fromtimestamp(0)
|
delay = datetime.fromtimestamp(0)
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
@ -54,7 +54,7 @@ def encode():
|
|||||||
|
|
||||||
|
|
||||||
def upload():
|
def upload():
|
||||||
date = datetime.strftime(datetime.now(), "%Y_%m_%d")
|
date = datetime.strftime(datetime.now(), Common.config["sdf"])
|
||||||
Common.appendUploadStatus("Upload Daemon Starting")
|
Common.appendUploadStatus("Upload Daemon Starting")
|
||||||
i = Common.uploadQueue.get()
|
i = Common.uploadQueue.get()
|
||||||
while True:
|
while True:
|
||||||
|
Reference in New Issue
Block a user