From 4ff95f057cd363f1eb4a9aaf3af3a2acfaed3ede Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 22 Jan 2023 15:33:14 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=B7=B2=E5=AE=89=E8=A3=85?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- class/core/plugins_api.py | 14 ++++++++++++++ data/json/type.json | 5 +++++ 2 files changed, 19 insertions(+) diff --git a/class/core/plugins_api.py b/class/core/plugins_api.py index 636ff19ba..4467e8242 100755 --- a/class/core/plugins_api.py +++ b/class/core/plugins_api.py @@ -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 diff --git a/data/json/type.json b/data/json/type.json index 58365b282..2943516b5 100755 --- a/data/json/type.json +++ b/data/json/type.json @@ -4,6 +4,11 @@ "type":0, "ps":"" }, + { + "title":"已安装", + "type":-1, + "ps":"" + }, { "title":"运行环境", "type":1,