Rely on unified apps.json for unlisted apps check

This commit is contained in:
Alexandre Aubin 2019-05-14 17:00:38 +00:00
parent 3052185415
commit f174d2fe2b

View file

@ -24,11 +24,9 @@ class UnlistedApp(db.Model):
UnlistedApp.query.delete() UnlistedApp.query.delete()
official = json.loads(requests.get("https://raw.githubusercontent.com/YunoHost/apps/master/official.json").text) community = json.loads(requests.get("https://raw.githubusercontent.com/YunoHost/apps/master/apps.json").text)
community = json.loads(requests.get("https://raw.githubusercontent.com/YunoHost/apps/master/community.json").text)
known_apps = set() known_apps = set()
known_apps = known_apps.union([os.path.basename(app["url"]).lower() for app in official.values() ])
known_apps = known_apps.union([os.path.basename(app["url"]).lower() for app in community.values() ]) known_apps = known_apps.union([os.path.basename(app["url"]).lower() for app in community.values() ])
apps = [] apps = []