关联关系

This commit is contained in:
2022-04-15 14:49:39 +08:00
parent e72eeb1f0e
commit 900b1bd614
3 changed files with 6 additions and 18 deletions

View File

@ -30,12 +30,6 @@ VIDEO_CLIP_OVERFLOW_SEC = 5
BILILIVE_RECORDER_DIRECTORY = "./"
# xigua_dir
XIGUALIVE_RECORDER_DIRECTORY = "./"
# [web]
# host
WEB_HOST = "0.0.0.0"
# port
WEB_PORT = 5000
def load_config():
if not os.path.exists("config.ini"):
@ -69,11 +63,6 @@ def load_config():
section = config['recorder']
BILILIVE_RECORDER_DIRECTORY = section.get('bili_dir', BILILIVE_RECORDER_DIRECTORY)
XIGUALIVE_RECORDER_DIRECTORY = section.get('xigua_dir', XIGUALIVE_RECORDER_DIRECTORY)
if config.has_section("web"):
global WEB_HOST, WEB_PORT
section = config['web']
WEB_HOST = section.get('host', WEB_HOST)
WEB_PORT = section.getint('port', WEB_PORT)
return True
@ -101,10 +90,6 @@ def get_config():
'bili_dir': BILILIVE_RECORDER_DIRECTORY,
'xigua_dir': XIGUALIVE_RECORDER_DIRECTORY,
},
'web': {
'host': WEB_HOST,
'port': WEB_PORT,
}
}
return config