mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 15:00:30 +03:00
🖼️ altstore index screenshots and icons
This commit is contained in:
parent
519c3c1fcf
commit
2658c22933
1 changed files with 13 additions and 2 deletions
|
|
@ -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:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue