增加已安装类型

pull/350/head
midoks 2 years ago
parent f32ba65596
commit 4ff95f057c
  1. 14
      class/core/plugins_api.py
  2. 5
      data/json/type.json

@ -728,6 +728,7 @@ class plugins_api:
def makeList(self, data, sType='0'):
plugins_info = []
# 相应类型
if (data['pid'] == sType):
if type(data['versions']) == list and 'coexist' in data and data['coexist']:
tmp_data = self.makeCoexist(data)
@ -738,6 +739,7 @@ class plugins_api:
plugins_info.append(pg)
return plugins_info
# 全部
if sType == '0':
if type(data['versions']) == list and 'coexist' in data and data['coexist']:
tmp_data = self.makeCoexist(data)
@ -747,6 +749,18 @@ class plugins_api:
pg = self.getPluginInfo(data)
plugins_info.append(pg)
# 已经安装
if sType == '-1':
if type(data['versions']) == list and 'coexist' in data and data['coexist']:
tmp_data = self.makeCoexist(data)
for index in range(len(tmp_data)):
if tmp_data[index]['setup']:
plugins_info.append(tmp_data[index])
else:
pg = self.getPluginInfo(data)
if pg['setup']:
plugins_info.append(pg)
# print plugins_info, data
return plugins_info

@ -4,6 +4,11 @@
"type":0,
"ps":""
},
{
"title":"已安装",
"type":-1,
"ps":""
},
{
"title":"运行环境",
"type":1,

Loading…
Cancel
Save