mirror of
https://gitea.phreedom.club/localhost_frssoft/funkwlmpv
synced 2024-12-22 18:23:34 +02:00
Add shuffle select instance
This commit is contained in:
parent
8d441fb84a
commit
c949f9fde2
1 changed files with 5 additions and 1 deletions
|
@ -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 a new issue