Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
TimBL
dr_py
提交
789f61e4
dr_py
项目概览
TimBL
/
dr_py
与 Fork 源项目一致
Fork自
晚风拂柳颜 / dr_py
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
dr_py
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
789f61e4
编写于
10月 03, 2022
作者:
H
hjdhnx
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
优化渲染机制
上级
5991ec18
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
8 addition
and
8 deletion
+8
-8
base/rules.db
base/rules.db
+0
-0
controllers/home.py
controllers/home.py
+6
-6
js/version.txt
js/version.txt
+1
-1
templates/config.txt
templates/config.txt
+1
-1
未找到文件。
base/rules.db
浏览文件 @
789f61e4
无法预览此类型文件
controllers/home.py
浏览文件 @
789f61e4
...
@@ -213,8 +213,8 @@ def config_render(mode):
...
@@ -213,8 +213,8 @@ def config_render(mode):
host
=
getHost
(
mode
)
host
=
getHost
(
mode
)
# ali_token = lsg.getItem('ALI_TOKEN')
# ali_token = lsg.getItem('ALI_TOKEN')
ali_token
=
new_conf
.
ALI_TOKEN
ali_token
=
new_conf
.
ALI_TOKEN
js_mode
=
new_conf
.
JS_MODE
js_mode
=
int
(
new_conf
.
JS_MODE
or
0
)
print
(
'jsmode:'
,
js_mode
)
print
(
f
'
{
type
(
js_mode
)
}
jsmode:
{
js_mode
}
'
)
# print(ali_token)
# print(ali_token)
customConfig
=
getCustonDict
(
host
,
ali_token
)
customConfig
=
getCustonDict
(
host
,
ali_token
)
# print(customConfig)
# print(customConfig)
...
@@ -250,8 +250,8 @@ def config_gen():
...
@@ -250,8 +250,8 @@ def config_gen():
store_conf_dict
=
lsg
.
getStoreConfDict
()
store_conf_dict
=
lsg
.
getStoreConfDict
()
new_conf
.
update
(
store_conf_dict
)
new_conf
.
update
(
store_conf_dict
)
try
:
try
:
lsg
=
storage_service
()
use_py
=
lsg
.
getItem
(
'USE_PY'
)
use_py
=
lsg
.
getItem
(
'USE_PY'
)
js_mode
=
int
(
new_conf
.
JS_MODE
or
0
)
pys
=
getPys
()
if
use_py
else
False
pys
=
getPys
()
if
use_py
else
False
alists
=
getAlist
()
alists
=
getAlist
()
alists_str
=
json
.
dumps
(
alists
,
ensure_ascii
=
False
)
alists_str
=
json
.
dumps
(
alists
,
ensure_ascii
=
False
)
...
@@ -259,14 +259,14 @@ def config_gen():
...
@@ -259,14 +259,14 @@ def config_gen():
rules
=
get_multi_rules
(
rules
)
rules
=
get_multi_rules
(
rules
)
host0
=
getHost
(
0
)
host0
=
getHost
(
0
)
jxs
=
getJxs
(
host
=
host0
)
jxs
=
getJxs
(
host
=
host0
)
set_local
=
render_template
(
'config.txt'
,
pys
=
pys
,
rules
=
rules
,
alists
=
alists
,
alists_str
=
alists_str
,
live_url
=
get_live_url
(
new_conf
,
0
),
mode
=
0
,
host
=
host0
,
jxs
=
jxs
)
set_local
=
render_template
(
'config.txt'
,
pys
=
pys
,
rules
=
rules
,
alists
=
alists
,
alists_str
=
alists_str
,
live_url
=
get_live_url
(
new_conf
,
0
),
mode
=
0
,
js_mode
=
js_mode
,
host
=
host0
,
jxs
=
jxs
)
# print(set_local)
# print(set_local)
host1
=
getHost
(
1
)
host1
=
getHost
(
1
)
jxs
=
getJxs
(
host
=
host1
)
jxs
=
getJxs
(
host
=
host1
)
set_area
=
render_template
(
'config.txt'
,
pys
=
pys
,
rules
=
rules
,
alists
=
alists
,
alists_str
=
alists_str
,
live_url
=
get_live_url
(
new_conf
,
1
),
mode
=
1
,
host
=
host1
,
jxs
=
jxs
)
set_area
=
render_template
(
'config.txt'
,
pys
=
pys
,
rules
=
rules
,
alists
=
alists
,
alists_str
=
alists_str
,
live_url
=
get_live_url
(
new_conf
,
1
),
mode
=
1
,
js_mode
=
js_mode
,
host
=
host1
,
jxs
=
jxs
)
host2
=
getHost
(
2
)
host2
=
getHost
(
2
)
jxs
=
getJxs
(
host
=
host2
)
jxs
=
getJxs
(
host
=
host2
)
set_online
=
render_template
(
'config.txt'
,
pys
=
pys
,
rules
=
rules
,
alists
=
alists
,
alists_str
=
alists_str
,
live_url
=
get_live_url
(
new_conf
,
2
),
mode
=
1
,
host
=
host2
,
jxs
=
jxs
)
set_online
=
render_template
(
'config.txt'
,
pys
=
pys
,
rules
=
rules
,
alists
=
alists
,
alists_str
=
alists_str
,
live_url
=
get_live_url
(
new_conf
,
2
),
mode
=
1
,
js_mode
=
js_mode
,
host
=
host2
,
jxs
=
jxs
)
ali_token
=
new_conf
.
ALI_TOKEN
ali_token
=
new_conf
.
ALI_TOKEN
with
open
(
'txt/pycms0.json'
,
'w+'
,
encoding
=
'utf-8'
)
as
f
:
with
open
(
'txt/pycms0.json'
,
'w+'
,
encoding
=
'utf-8'
)
as
f
:
customConfig
=
getCustonDict
(
host0
,
ali_token
)
customConfig
=
getCustonDict
(
host0
,
ali_token
)
...
...
js/version.txt
浏览文件 @
789f61e4
3.7.19beta2
3.7.19beta3
\ No newline at end of file
\ No newline at end of file
templates/config.txt
浏览文件 @
789f61e4
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
"spider": "{{ host }}/liveslib",
"spider": "{{ host }}/liveslib",
{% if alists|length > 0 %}"drives": {{alists_str}},{% endif %}
{% if alists|length > 0 %}"drives": {{alists_str}},{% endif %}
"homepage":"https://gitcode.net/qq_32394351/dr_py",
"homepage":"https://gitcode.net/qq_32394351/dr_py",
"sites": [{% for rule in rules.list %}{% if js_mode
== 0
%}
"sites": [{% for rule in rules.list %}{% if js_mode
!= 1
%}
{
{
"key":"dr_{{ rule.name }}",
"key":"dr_{{ rule.name }}",
"name":"{{ rule.name }}(道长)",
"name":"{{ rule.name }}(道长)",
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录