From dc40e5331c5141cb3a93a59118afca13bf01aa21 Mon Sep 17 00:00:00 2001 From: localhost_frssoft Date: Wed, 14 Jun 2023 15:27:15 +0300 Subject: [PATCH] Fix login in to new instance --- funkwhale_cli.py | 7 ++++--- src/fw_api.py | 6 +++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/funkwhale_cli.py b/funkwhale_cli.py index 8b97953..759bd26 100755 --- a/funkwhale_cli.py +++ b/funkwhale_cli.py @@ -104,7 +104,7 @@ def main(): if selected == 'Sign in': print(f''' If You want sign in, please visit: -https://{instance}/settings/applications/new +https://{current_instance.instance}/settings/applications/new And fill Name funkwhale-cli Scopes: Read, Write (optional): write:favorites write:listenings write:filters @@ -113,13 +113,14 @@ Insert token from "Access token" here''') with open('.auth.json', 'rt') as f: tkns = json.loads(f.read()) with open('.auth.json', 'wt') as f: - tkns[instance] = register_token + tkns[current_instance.instance] = register_token f.write(json.dumps(tkns)) del tkns del register_token del f + os.system('clear') - current_instance.select_instance(instance) + current_instance.select_instance(current_instance.instance) if selected == 'Donate': os.system(f'less <