Now dump new instances in config

This commit is contained in:
localhost_frssoft 2023-06-06 00:51:54 +03:00
parent 982e5f5a87
commit 11dba2648d
2 changed files with 8 additions and 0 deletions

View file

@ -90,6 +90,13 @@ def get_config(key):
return loaded_config.get(key)
def set_config(key, value):
'''set value new value config by key'''
read_conf = check_config()
with open(conf_file, 'wt') as f:
read_conf[key] = value
f.write(json.dumps(read_conf, indent=4))
@logger.catch
def get_new_funkwhale_servers():
# Uses official API network.funkwhale.audio for getting new instances