mirror of
https://gitea.phreedom.club/localhost_frssoft/funkwlmpv
synced 2024-11-14 18:59:20 +02:00
Add shuffle select instance
This commit is contained in:
parent
8d441fb84a
commit
c949f9fde2
|
@ -117,7 +117,8 @@ def instances_menu(fetch_manually=False, fetch_node_info=False):
|
|||
map_in_extend_mode = '\nmap: instance | anonymousCanListen | tracks'
|
||||
instance_menu_selector = ['Fetch new instances',
|
||||
'Fetch nodeinfo and avalaibility',
|
||||
'Remove unreachible instances']
|
||||
'Remove unreachible instances',
|
||||
'Shuffle']
|
||||
|
||||
instance = fzf.prompt(
|
||||
instance_menu_selector +
|
||||
|
@ -131,6 +132,9 @@ def instances_menu(fetch_manually=False, fetch_node_info=False):
|
|||
return instances_menu(fetch_manually=True)
|
||||
if instance == 'Fetch nodeinfo and avalaibility':
|
||||
return instances_menu(fetch_node_info=True)
|
||||
if instance == 'Shuffle':
|
||||
import random
|
||||
instance = random.choice(list(list_instances.keys()))
|
||||
if instance == 'Remove unreachible instances':
|
||||
clean_unreach = {}
|
||||
for ins, info in list_instances.items():
|
||||
|
|
Loading…
Reference in New Issue