mirror of
https://gitea.phreedom.club/localhost_frssoft/funkwlmpv
synced 2024-12-30 10:29:48 +00:00
cosmetic fix
This commit is contained in:
parent
add2ef572c
commit
821769f47b
@ -90,7 +90,7 @@ def main():
|
||||
print('Input url:')
|
||||
returned_obj = federate_search_by_url(input())
|
||||
logger.info(str(returned_obj))
|
||||
|
||||
|
||||
if selected == 'Switch instance':
|
||||
with open('config.json', 'rt') as f:
|
||||
conf = json.loads(f.read())
|
||||
@ -104,10 +104,10 @@ def main():
|
||||
current_instance.select_instance(instance)
|
||||
if selected == 'Sign in':
|
||||
print(f'''
|
||||
If You want sign in, please visit:
|
||||
If You want sign in, please visit:
|
||||
https://{instance}/settings/applications/new
|
||||
And fill Name funkwhale-cli
|
||||
Scopes: Read, Write (optional): write:favorites write:listenings write:filters
|
||||
Scopes: Read, Write (optional): write:favorites write:listenings write:filters
|
||||
|
||||
Insert token from "Access token" here''')
|
||||
register_token = input()
|
||||
|
@ -35,7 +35,6 @@ class current_instance:
|
||||
token = auth.get(instance)
|
||||
listen_token = None
|
||||
|
||||
|
||||
@logger.catch
|
||||
def select_instance(new_instance=None):
|
||||
current_instance.instance = new_instance
|
||||
@ -55,7 +54,7 @@ if current_instance.token:
|
||||
else:
|
||||
# Get cookies from unauthorized instance for working some functionality (radios)
|
||||
current_instance.s.get(f'https://{current_instance.instance}/')
|
||||
|
||||
|
||||
|
||||
@logger.catch
|
||||
def get_me():
|
||||
@ -65,7 +64,7 @@ def get_me():
|
||||
r = current_instance.s.get(f'https://{current_instance.instance}/api/v1/users/me')
|
||||
resp = r.json()
|
||||
current_instance.listen_token = resp['tokens']['listen']
|
||||
return resp
|
||||
return resp
|
||||
|
||||
|
||||
def get_instance_settings():
|
||||
@ -77,7 +76,7 @@ def get_instance_settings():
|
||||
|
||||
|
||||
@logger.catch
|
||||
def get_audio_file(track_uuid, listen_url=False, download=False,
|
||||
def get_audio_file(track_uuid, listen_url=False, download=False,
|
||||
external_transcoding=get_config('external_transcoder_http_proxy_path'),
|
||||
transcoding=get_config('enable_server_transcoding'), to='ogg'):
|
||||
params = {
|
||||
|
Loading…
Reference in New Issue
Block a user