You've already forked my-video-workflow
关联关系
This commit is contained in:
15
config.py
15
config.py
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user