Misc update and fixes /o\

This commit is contained in:
Alexandre Aubin 2023-06-11 14:34:22 +02:00
parent f718e5be53
commit e6edec84db
4 changed files with 10 additions and 6 deletions

View file

@ -47,7 +47,7 @@ class AppCatalog():
if isinstance(maintainers_info, list):
known_app.maintainers = [ maintainer["name"] for maintainer in maintainers_info ]
known_app.maintained = 'package-not-maintained' not in app.get('antifeatures', []),
known_app.maintained = 'package-not-maintained' not in app.get('antifeatures', [])
known_app.state = app["state"]
known_app.public_level = app.get("level", None)

View file

@ -23,7 +23,7 @@ class AppCIBranch(db.Model):
arch="amd64",
branch="stable",
display_name='Stable (x86)',
url='https://ci-apps.yunohost.org/ci/logs/list_level_stable_amd64.json',
url='https://ci-apps.yunohost.org/ci/api/results',
url_per_app='https://ci-apps.yunohost.org/ci/apps/{}/latestjob')
yield AppCIBranch(name='unstable',

View file

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

View file

@ -1,4 +1,4 @@
import toml
import json
import os
import sys
@ -62,6 +62,9 @@ def get_lists_history():
merged.update(community)
merged.update(official)
else:
try:
merged = toml.loads(open("./.work/apps/apps.toml").read())
except:
try:
merged = json.loads(open("./.work/apps/apps.json").read())
except: