1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-13 02:30:11 +01:00

🖼️ altstore index screenshots and icons

This commit is contained in:
Michael Pöhn 2024-03-10 10:33:51 +01:00
parent 519c3c1fcf
commit 2658c22933
No known key found for this signature in database
GPG Key ID: 725F386C05529A5A

View File

@ -2699,11 +2699,22 @@ def altstore_index(apps, apks, config, repodir, indent=None):
# assemble "apps"
for packageName, app in apps.items():
app_name = app.get("Name") or app.get("AutoName")
icon_url = "{}{}".format(
config['repo_url'],
app.get('iconv2', {}).get(DEFAULT_LOCALE, {}).get('name', ''),
)
screenshot_urls = [
"{}{}".format(config["repo_url"], s["name"])
for s in app.get("screenshots", {})
.get("phone", {})
.get(DEFAULT_LOCALE, {})
]
a = {
"name": app_name,
'bundleIdentifier': packageName,
'developerName': app.get("AuthorName") or f"{app_name} team",
'iconURL': app.get('iconv2', {}).get(DEFAULT_LOCALE, {}).get('name', ''),
'iconURL': icon_url,
"localizedDescription": "",
'appPermissions': {
"entitlements": set(),
@ -2717,7 +2728,7 @@ def altstore_index(apps, apks, config, repodir, indent=None):
# a["tintColor"] F-Droid doesn't have a corresponding value
# a["category"] F-Droid doesn't have a corresponding value
# a['patreon'] F-Droid doesn't have a corresponding value
# a["screenshots"] TODO
a["screenshots"] = screenshot_urls
# populate 'versions'
for apk in apks: