update: only gen index.png when making index.html

* https://f-droid.org/repo does not use the index.png at all
* Some repos want to set their own index.png rather than the QR code
This commit is contained in:
Hans-Christoph Steiner 2024-12-04 11:55:07 +01:00
parent 11aee5b325
commit ad9b0c3294

View file

@ -155,12 +155,11 @@ def make_website(apps, repodir, repodict):
if not os.path.exists(repodir): if not os.path.exists(repodir):
os.makedirs(repodir) os.makedirs(repodir)
qrcode.make(link_fingerprinted).save(os.path.join(repodir, "index.png"))
html_name = 'index.html' html_name = 'index.html'
html_file = os.path.join(repodir, html_name) html_file = os.path.join(repodir, html_name)
if _should_file_be_generated(html_file, autogenerate_comment): if _should_file_be_generated(html_file, autogenerate_comment):
qrcode.make(link_fingerprinted).save(os.path.join(repodir, "index.png"))
with open(html_file, 'w') as f: with open(html_file, 'w') as f:
name = repodict["name"] name = repodict["name"]
description = repodict["description"] description = repodict["description"]