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 <