mirror of
http://gitea.phreedom.club/localhost_frssoft/funkwlmpv
synced 2024-11-22 04:11:29 +00:00
reduce menu if connection failed
This commit is contained in:
parent
706d7684dd
commit
3327ec41c6
|
@ -25,6 +25,16 @@ def main():
|
||||||
while True:
|
while True:
|
||||||
support_message = ''
|
support_message = ''
|
||||||
instance_title = ''
|
instance_title = ''
|
||||||
|
menu = ['Radios',
|
||||||
|
'Artists',
|
||||||
|
'Albums',
|
||||||
|
'Tracks',
|
||||||
|
'Channels',
|
||||||
|
'Playlists',
|
||||||
|
'Favorites',
|
||||||
|
'Recently listened',
|
||||||
|
'Search',
|
||||||
|
'Switch instance']
|
||||||
try:
|
try:
|
||||||
ins_settings = get_instance_settings()
|
ins_settings = get_instance_settings()
|
||||||
for i in ins_settings:
|
for i in ins_settings:
|
||||||
|
@ -36,17 +46,8 @@ def main():
|
||||||
except:
|
except:
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
main_menu_header = quote(f'''Connection failed'''.strip())
|
main_menu_header = quote(f'''Connection failed'''.strip())
|
||||||
|
menu = ['Switch instance']
|
||||||
|
|
||||||
menu = ['Radios',
|
|
||||||
'Artists',
|
|
||||||
'Albums',
|
|
||||||
'Tracks',
|
|
||||||
'Channels',
|
|
||||||
'Playlists',
|
|
||||||
'Favorites',
|
|
||||||
'Recently listened',
|
|
||||||
'Search',
|
|
||||||
'Switch instance']
|
|
||||||
if not current_instance.s.headers.get('Authorization'):
|
if not current_instance.s.headers.get('Authorization'):
|
||||||
menu.append('Sign in')
|
menu.append('Sign in')
|
||||||
if support_message != '':
|
if support_message != '':
|
||||||
|
|
Loading…
Reference in a new issue