Merge branch 'fix_generic_whatsNew' into 'master'

Add unversioned whatsNew to index-v2 (Closes: #1202)

Closes #1202

See merge request fdroid/fdroidserver!1456
This commit is contained in:
Hans-Christoph Steiner 2024-03-13 18:11:00 +00:00
commit 980ff3c20a
1 changed files with 9 additions and 1 deletions

View File

@ -640,7 +640,15 @@ def convert_version(version, app, repodir):
if version["versionCode"] > app["CurrentVersionCode"]:
ver[RELEASECHANNELS_CONFIG_NAME] = ["Beta"]
for build in app.get('Builds', []):
builds = app.get("Builds", [])
if len(builds) > 0 and version["versionCode"] == builds[-1]["versionCode"]:
if "localized" in app:
localized = {k: v["whatsNew"] for k, v in app["localized"].items() if "whatsNew" in v}
if localized:
ver["whatsNew"] = localized
for build in builds:
if build['versionCode'] == version['versionCode'] and "whatsNew" in build:
ver["whatsNew"] = build["whatsNew"]
break