mirror of
http://gitea.phreedom.club/localhost_frssoft/funkwlmpv
synced 2024-11-21 18:41:28 +00:00
reduce menu if connection failed
This commit is contained in:
parent
706d7684dd
commit
3327ec41c6
|
@ -25,6 +25,16 @@ def main():
|
|||
while True:
|
||||
support_message = ''
|
||||
instance_title = ''
|
||||
menu = ['Radios',
|
||||
'Artists',
|
||||
'Albums',
|
||||
'Tracks',
|
||||
'Channels',
|
||||
'Playlists',
|
||||
'Favorites',
|
||||
'Recently listened',
|
||||
'Search',
|
||||
'Switch instance']
|
||||
try:
|
||||
ins_settings = get_instance_settings()
|
||||
for i in ins_settings:
|
||||
|
@ -36,17 +46,8 @@ def main():
|
|||
except:
|
||||
time.sleep(1)
|
||||
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'):
|
||||
menu.append('Sign in')
|
||||
if support_message != '':
|
||||
|
|
Loading…
Reference in a new issue