From bd095da8ac00f57a37cbf7a956c65faa6345985c Mon Sep 17 00:00:00 2001 From: localhost_frssoft Date: Mon, 28 Nov 2022 02:48:22 +0300 Subject: [PATCH] Server instanses counter --- funkwhale_cli.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/funkwhale_cli.py b/funkwhale_cli.py index 193ac65..61befc2 100644 --- a/funkwhale_cli.py +++ b/funkwhale_cli.py @@ -74,8 +74,11 @@ def main(): if selected == 'Switch instance': with open('config.json', 'rt') as f: conf = json.loads(f.read()) - list_instances = conf.get('public_list_instances') + settings.get_new_funkwhale_servers() - instance = fzf.prompt(list_instances, '--header \'Select instance\'')[0] + public_server_list_instances = settings.get_new_funkwhale_servers() + new_ins_count = len(settings.get_new_funkwhale_servers()) + list_instances = conf.get('public_list_instances') + public_server_list_instances + instance = fzf.prompt(list_instances, + '--header='+quote(f'Select instance\nServer instances: +{new_ins_count}'))[0] select_instance(instance) if selected == 'Sign in': print(f'''