Add app logos (#1557)

* Add app logos

* Typos
This commit is contained in:
Alexandre Aubin 2023-01-03 16:22:10 +01:00 committed by GitHub
parent 8814b08f7d
commit 2bbae095b1

View file

@ -213,6 +213,16 @@ def build_catalog():
if "manifest" in app and "resources" in app["manifest"]:
del app["manifest"]["resources"]
for appid, app in result_dict_with_manifest_v2.items():
appid = appid.lower()
if os.path.exists(f"logos/{appid}.png"):
logo_hash = subprocess.check_output(["sha256sum", f"logos/{appid}.png"]).strip().decode("utf-8").split()[0]
os.system(f"cp logos/{appid}.png builds/default/v3/logos/{logo_hash}.png")
# FIXME: implement something to cleanup old logo stuf in the builds/.../logos/ folder somehow
else:
logo_hash = None
app["logo_hash"] = logo_hash
os.system("mkdir -p ./builds/default/v3/")
with open("builds/default/v3/apps.json", "w") as f:
f.write(