mirror of
https://github.com/MeoProject/lx-music-api-server.git
synced 2025-07-07 06:52:11 +08:00
feat: 支持在配置文件中自定义下载的源脚本的基础信息
This commit is contained in:
@ -55,6 +55,16 @@ async def generate_script_response(request):
|
||||
newScriptLines.append(f'const API_URL = "{request.scheme}://{request.host}"')
|
||||
elif (line.startswith('const API_KEY')):
|
||||
newScriptLines.append(f'const API_KEY = "{config.read_config("security.key.value")}"')
|
||||
elif (line.startswith("/*")):
|
||||
newScriptLines.append(" /*")
|
||||
elif (line.startswith("* @name")):
|
||||
newScriptLines.append(" * @name " + config.read_config("common.download_config.name"))
|
||||
elif (line.startswith("* @description")):
|
||||
newScriptLines.append(" * @description " + config.read_config("common.download_config.intro"))
|
||||
elif (line.startswith("* @author")):
|
||||
newScriptLines.append((" * @author helloplhm-qwq & Folltoshe & " + config.read_config("common.download_config.author")) if config.read_config("common.download_config.author") else " * @author helloplhm-qwq & Folltoshe")
|
||||
elif (line.startswith("* @version")):
|
||||
newScriptLines.append(" * @name " + config.read_config("common.download_config.version"))
|
||||
else:
|
||||
newScriptLines.append(line)
|
||||
|
||||
|
Reference in New Issue
Block a user