1
0
Fork 0

small fixes

This commit is contained in:
OniriCorpe 2024-02-14 03:58:37 +01:00
parent d65a43a89d
commit 0ef037d7de

View file

@ -326,12 +326,22 @@ class AppAutoUpdater:
for release in releases for release in releases
if release["tag_name"] == latest_version_orig if release["tag_name"] == latest_version_orig
][0] ][0]
if "github" in strategy or "gitlab" in strategy:
latest_assets = { latest_assets = {
a["name"]: a["browser_download_url"] a["name"]: a["browser_download_url"]
for a in latest_release["assets"] for a in latest_release["assets"]
if not a["name"].endswith(".md5") if not a["name"].endswith(".md5")
} }
if strategy == "latest_gitlab_release": elif "gitea" in strategy or "forgejo" in strategy:
latest_assets = {
a["name"]: a["browser_download_url"]
for a in latest_release["assets"]
if not a["name"].endswith(".md5")
}
if latest_assets == "":
# if empty (so only the base asset), take the tarball_url
latest_assets = latest_release["tarball_url"]
if strategy == "_release":
# gitlab's API is different for that # gitlab's API is different for that
latest_release_html_url = latest_release["_links"]["self"] latest_release_html_url = latest_release["_links"]["self"]
else: else: