mirror of
http://gitea.phreedom.club/localhost_frssoft/funkwlmpv
synced 2024-11-21 21:51:28 +00:00
Add new instance via menu
This commit is contained in:
parent
25217ae98f
commit
808e94a8ac
|
@ -115,7 +115,8 @@ def instances_menu(fetch_manually=False, fetch_node_info=False):
|
||||||
list_instances = fetch_instances_nodeinfo_and_avalaibility([instance.split('|')[0].strip() for instance in list_instances.keys()])
|
list_instances = fetch_instances_nodeinfo_and_avalaibility([instance.split('|')[0].strip() for instance in list_instances.keys()])
|
||||||
settings.set_config('public_list_instances_extended', list_instances)
|
settings.set_config('public_list_instances_extended', list_instances)
|
||||||
map_in_extend_mode = '\nmap: instance | anonymousCanListen | tracks'
|
map_in_extend_mode = '\nmap: instance | anonymousCanListen | tracks'
|
||||||
instance_menu_selector = ['Fetch new instances',
|
instance_menu_selector = ['Add new instance',
|
||||||
|
'Fetch new instances',
|
||||||
'Fetch nodeinfo and avalaibility',
|
'Fetch nodeinfo and avalaibility',
|
||||||
'Remove unreachible instances',
|
'Remove unreachible instances',
|
||||||
'Shuffle']
|
'Shuffle']
|
||||||
|
@ -128,6 +129,11 @@ def instances_menu(fetch_manually=False, fetch_node_info=False):
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
instance = instance[0].split('|')[0].strip()
|
instance = instance[0].split('|')[0].strip()
|
||||||
|
if instance == 'Add new instance':
|
||||||
|
new = input('example.com\n').strip()
|
||||||
|
list_instances[new] = 'added by user'
|
||||||
|
settings.set_config('public_list_instances_extended', list_instances)
|
||||||
|
instance = new
|
||||||
if instance == 'Fetch new instances':
|
if instance == 'Fetch new instances':
|
||||||
return instances_menu(fetch_manually=True)
|
return instances_menu(fetch_manually=True)
|
||||||
if instance == 'Fetch nodeinfo and avalaibility':
|
if instance == 'Fetch nodeinfo and avalaibility':
|
||||||
|
|
Loading…
Reference in a new issue