支持控制自动投递

This commit is contained in:
2022-08-31 14:53:45 +08:00
parent 0d2f9e2a28
commit 9f443dfae2
3 changed files with 23 additions and 11 deletions

View File

@ -27,6 +27,8 @@ VIDEO_BITRATE = "2.5M"
# crf
VIDEO_CRF = 28
# [video]
# enabled
VIDEO_ENABLED = False
# title
VIDEO_TITLE = "【永恒de草薙直播录播】直播于 {}"
# desc
@ -70,7 +72,8 @@ def load_config():
VIDEO_RESOLUTION = section.get('resolution', VIDEO_RESOLUTION)
if config.has_section("video"):
section = config['video']
global VIDEO_TITLE, VIDEO_DESC, VIDEO_TID, VIDEO_TAGS
global VIDEO_ENABLED, VIDEO_TITLE, VIDEO_DESC, VIDEO_TID, VIDEO_TAGS
VIDEO_ENABLED = section.getboolean('enabled', VIDEO_ENABLED)
VIDEO_TITLE = section.get('title', VIDEO_TITLE)
VIDEO_DESC = section.get('desc', VIDEO_DESC)
VIDEO_TID = section.getint('tid', VIDEO_TID)
@ -108,6 +111,7 @@ def get_config():
'resolution': VIDEO_RESOLUTION,
},
'video': {
'enabled': VIDEO_ENABLED,
'title': VIDEO_TITLE,
'desc': VIDEO_DESC,
'tid': VIDEO_TID,