diff --git a/app.py b/app.py index 13358e45e0214c2675303579bb0aebef2c267ed3..e8189ca978041cee17594b31bf4725a812e21a55 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 f78c63792d07df25208c380c6d32912f74fb2716..0feab2f93d59c1060832a47bef775e6bd129cf52 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 da360f3f8c3581c6d4b9b947185c4267a6a84fd6..67147679c3ffbd61193dc5b123882aa61bc152fd 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 %}