🖼️ 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" # assemble "apps"
for packageName, app in apps.items(): for packageName, app in apps.items():
app_name = app.get("Name") or app.get("AutoName") 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 = { a = {
"name": app_name, "name": app_name,
'bundleIdentifier': packageName, 'bundleIdentifier': packageName,
'developerName': app.get("AuthorName") or f"{app_name} team", 'developerName': app.get("AuthorName") or f"{app_name} team",
'iconURL': app.get('iconv2', {}).get(DEFAULT_LOCALE, {}).get('name', ''), 'iconURL': icon_url,
"localizedDescription": "", "localizedDescription": "",
'appPermissions': { 'appPermissions': {
"entitlements": set(), "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["tintColor"] F-Droid doesn't have a corresponding value
# a["category"] 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['patreon'] F-Droid doesn't have a corresponding value
# a["screenshots"] TODO a["screenshots"] = screenshot_urls
# populate 'versions' # populate 'versions'
for apk in apks: for apk in apks: