🖼️ altstore index screenshots and icons

This commit is contained in:
Michael Pöhn 2024-03-10 10:33:51 +01:00
parent 95d56eaaf7
commit 90d4051cc6
No known key found for this signature in database
GPG Key ID: 725F386C05529A5A
1 changed files with 13 additions and 2 deletions

View File

@ -2681,11 +2681,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(),
@ -2699,7 +2710,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: