Compare commits

..

No commits in common. "96ce6e6e0d7af72b3532f798d9d8a4800fcb3be3" and "ebd4d148768d04bb6b647b6086ede97046773410" have entirely different histories.

2 changed files with 8 additions and 9 deletions

View File

@ -78,7 +78,7 @@ def fetch_instances_nodeinfo_and_avalaibility(instances):
headers={ headers={
'Accept-Encoding': 'gzip, brotli, deflate', 'Accept-Encoding': 'gzip, brotli, deflate',
'User-Agent': 'funkwhale-cli/latest-commit; +https://git.phreedom.club/localhost_frssoft/funkwhale-cli'}, 'User-Agent': 'funkwhale-cli/latest-commit; +https://git.phreedom.club/localhost_frssoft/funkwhale-cli'},
timeout=10).json() timeout=5).json()
with concurrent.futures.ThreadPoolExecutor() as executor: # optimally defined number of threads with concurrent.futures.ThreadPoolExecutor() as executor: # optimally defined number of threads
res = [executor.submit(request_nodeinfo, instance) for instance in instances] res = [executor.submit(request_nodeinfo, instance) for instance in instances]
@ -115,8 +115,7 @@ 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 = ['Add new instance', instance_menu_selector = ['Fetch new instances',
'Fetch new instances',
'Fetch nodeinfo and avalaibility', 'Fetch nodeinfo and avalaibility',
'Remove unreachible instances', 'Remove unreachible instances',
'Shuffle'] 'Shuffle']
@ -129,11 +128,6 @@ 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':

View File

@ -12,11 +12,14 @@ default_conf = {
'public_list_instances_extended': 'public_list_instances_extended':
{ {
"open.audio": None, "open.audio": None,
"funkwhale.co.uk": None,
"am.pirateradio.social": None,
"audio.liberta.vip": None, "audio.liberta.vip": None,
"dance.with.tewi.and.reisen": None, "audio.gafamfree.party": None,
"tanukitunes.com": None, "tanukitunes.com": None,
"funkwhale.juniorjpdj.pl": None, "funkwhale.juniorjpdj.pl": None,
"audio.securetown.in.ua": None, "audio.securetown.in.ua": None,
"tavia.mle.party": None,
"funkwhale.thurk.org": None, "funkwhale.thurk.org": None,
"buzzworkers.com": None, "buzzworkers.com": None,
"soundship.de": None, "soundship.de": None,
@ -28,11 +31,13 @@ default_conf = {
"mizik.o-k-i.net": None, "mizik.o-k-i.net": None,
"klh.radiolivre.org": None, "klh.radiolivre.org": None,
"hudba.feildel.fr": None, "hudba.feildel.fr": None,
"funkwhale.mita.me": None,
"funk.deko.cloud": None, "funk.deko.cloud": None,
"audio.graz.social": None, "audio.graz.social": None,
"funkwhale.desmu.fr": None, "funkwhale.desmu.fr": None,
"listen.knsm.cc": None, "listen.knsm.cc": None,
"funkwhale.gegeweb.eu": None, "funkwhale.gegeweb.eu": None,
"shitnoise.monster": None,
}, },
'automatic_fetch_new_instances': False, 'automatic_fetch_new_instances': False,
'enable_server_transcoding': False, 'enable_server_transcoding': False,