From 693c645f079ec1bdd23fd65533b46b5e2702eaa0 Mon Sep 17 00:00:00 2001 From: hjdhnx Date: Sun, 28 Aug 2022 14:26:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=87=AA=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E5=A3=81=E7=BA=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.py | 3 ++- config.py | 3 ++- templates/config.txt | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app.py b/app.py index 13358e4..e8189ca 100644 --- a/app.py +++ b/app.py @@ -204,7 +204,8 @@ def rules_raw(): @app.route('/config/') def config_render(mode): - html = render_template('config.txt',rules=getRules('js'),host=getHost(mode),mode=mode,jxs=getJxs()) + print(dict(app.config)) + html = render_template('config.txt',rules=getRules('js'),host=getHost(mode),mode=mode,jxs=getJxs(),config=dict(app.config)) response = make_response(html) response.headers['Content-Type'] = 'application/json; charset=utf-8' return response diff --git a/config.py b/config.py index f78c637..0feab2f 100644 --- a/config.py +++ b/config.py @@ -19,4 +19,5 @@ SQLALCHEMY_ECHO = False # 打印sql语句 JSON_AS_ASCII = False # jsonify返回的中文正常显示 # PLAY_URL = 'http://localhost:5705' # 匹配远程解析服务器链接 # PLAY_URL = PLAY_URL.rstrip('/') -PLAY_DISABLE = False # 全局禁用播放解析 \ No newline at end of file +PLAY_DISABLE = False # 全局禁用播放解析 +WALL_PAPER = "https://picsum.photos/1280/720/?blur=10" # 自定义壁纸,可注释 \ No newline at end of file diff --git a/templates/config.txt b/templates/config.txt index da360f3..6714767 100644 --- a/templates/config.txt +++ b/templates/config.txt @@ -1,4 +1,5 @@ { +{% if config.WALL_PAPER %}"wallpaper":"{{ config.WALL_PAPER }}",{% endif %} "dr_count": {{rules.list|length}}, "mode": {{ mode }}, "sites": [{% for rule in rules.list %}{% if mode == 0 %} -- GitLab