From d96d06e915805d714d9c850515f3625b5217fd06 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 31 Oct 2020 14:12:16 +0100 Subject: [PATCH] Label ain't in setting anymore ... but let's add a shortcut to get it easily from app_info() --- src/yunohost/app.py | 3 +++ src/yunohost/tools.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/yunohost/app.py b/src/yunohost/app.py index 86073f5e9..714580abc 100644 --- a/src/yunohost/app.py +++ b/src/yunohost/app.py @@ -179,6 +179,9 @@ def app_info(app, full=False): ret['supports_multi_instance'] = is_true(local_manifest.get("multi_instance", False)) permissions = user_permission_list(full=True, absolute_urls=True)["permissions"] ret['permissions'] = {p: i for p, i in permissions.items() if p.startswith(app + ".") and (i["url"] or i['additional_urls'])} + ret['label'] = permissions.get(app + ".main", {}).get("label") + if not ret['label']: + logger.warning("Failed to get label for app %s ?" % app) return ret diff --git a/src/yunohost/tools.py b/src/yunohost/tools.py index a842cc590..132f8c668 100644 --- a/src/yunohost/tools.py +++ b/src/yunohost/tools.py @@ -493,7 +493,7 @@ def _list_upgradable_apps(): yield { 'id': app_id, - 'label': app_dict['settings']['label'], + 'label': app_dict['label'], 'current_version': current_version, 'new_version': new_version }