改为json索引

This commit is contained in:
denglihong2007
2025-07-26 17:48:15 +08:00
parent ec22c30a32
commit 614d1a63c1
2 changed files with 2 additions and 4 deletions

Binary file not shown.

View File

@@ -2,7 +2,6 @@ import os
import zipfile
import shutil
import json
import yaml
def main():
base_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
@@ -25,9 +24,8 @@ def main():
if fname.endswith(".crsp"):
crsp_path = os.path.join(plugins_dir, fname)
with zipfile.ZipFile(crsp_path, "r") as zf:
# 读取manifest.yml
with zf.open("manifest.yml") as mf:
manifest = yaml.safe_load(mf)
with zf.open("manifest.json") as mf:
manifest = json.load(mf)
manifests.append(manifest)
# 提取icon.png
icon_name = os.path.splitext(fname)[0] + ".png"