提交 bc0f66d6 编写于 作者: H hjdhnx

drpy聚搜优化

上级 55d2582d
无法预览此类型文件
......@@ -71,10 +71,13 @@ def getRules(path='cache',js_mode=0):
# print(rule_codes[0].quickSearch)
new_rule_list = []
for i in range(len(rule_list)):
if js_mode == 1 and rule_list[i] == 'drpy':
continue
sable = rule_codes[i].searchable or 0
tmpObj = {
'name':rule_list[i],
'searchable':1 if (js_mode==1 and sable==2) else sable,
# 'searchable':1 if (js_mode==1 and sable==2) else sable, # 对js模式1开放软件聚搜(还是算了,服务器遭不住)
'searchable':sable,
'quickSearch':rule_codes[i].quickSearch or 0,
'filterable':rule_codes[i].filterable or 0,
}
......
......@@ -25,6 +25,15 @@
"filterable": {{ rule.filterable }},
"ext":"{{ host }}/admin/view/{{ rule.name }}.js"
}{% endif %}{% if loop.last==False %},{% endif %}{% endfor %}
{% if js_mode == 1 %},{
"key":"dr_drpy",
"name":"drpy(道长)",
"type":1,
"api":"{{ host }}/vod?rule=drpy",
"searchable": 2,
"quickSearch": 1,
"filterable": 1
}{% endif %}
{% if pys %}
,{% for py in pys %}{
"key":"{{ py.name }}",
......
......@@ -134,6 +134,7 @@ def baseDecode(text):
def parseText(text:str):
text = text.replace('false','False').replace('true','True').replace('null','None')
# print(text)
return literal_eval(text)
def setDetail(title:str,img:str,desc:str,content:str,tabs:list=None,lists:list=None):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册