From 46cca08476b0d6028f0e2596a898b64978bcabb0 Mon Sep 17 00:00:00 2001
From: OniriCorpe <oniricorpe@disroot.org>
Date: Wed, 14 Feb 2024 05:00:07 +0100
Subject: [PATCH] small refactor

---
 .../autoupdate_app_sources.py                 | 23 +++++++------------
 1 file changed, 8 insertions(+), 15 deletions(-)

diff --git a/tools/autoupdate_app_sources/autoupdate_app_sources.py b/tools/autoupdate_app_sources/autoupdate_app_sources.py
index 3c0c58c..e8ea9e4 100644
--- a/tools/autoupdate_app_sources/autoupdate_app_sources.py
+++ b/tools/autoupdate_app_sources/autoupdate_app_sources.py
@@ -326,21 +326,14 @@ class AppAutoUpdater:
                 for release in releases
                 if release["tag_name"] == latest_version_orig
             ][0]
-            if "github" in strategy or "gitlab" in strategy:
-                latest_assets = {
-                    a["name"]: a["browser_download_url"]
-                    for a in latest_release["assets"]
-                    if not a["name"].endswith(".md5")
-                }
-            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"]
+            latest_assets = {
+                a["name"]: a["browser_download_url"]
+                for a in latest_release["assets"]
+                if not a["name"].endswith(".md5")
+            }
+            if ("gitea" in strategy or "forgejo" in strategy) and 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
                 latest_release_html_url = latest_release["_links"]["self"]