Albums view

This commit is contained in:
localhost_frssoft 2022-11-08 21:08:24 +03:00
parent 7f2a3ae4c9
commit fe51810a43

View File

@ -1,6 +1,7 @@
from src.fw_api import s, select_instance, instance from src.fw_api import s, select_instance, instance
from src.fw_radios import list_radios from src.fw_radios import list_radios
from src.fw_artists import list_artists from src.fw_artists import list_artists
from src.fw_albums import list_albums
import json, sys import json, sys
from loguru import logger from loguru import logger
from pyfzf.pyfzf import FzfPrompt from pyfzf.pyfzf import FzfPrompt
@ -15,6 +16,7 @@ def main():
while True: while True:
menu = ['Radios', menu = ['Radios',
'Artists', 'Artists',
'Albums',
'Switch instance'] 'Switch instance']
if not s.headers.get('Authorization'): if not s.headers.get('Authorization'):
menu.append('Sign in') menu.append('Sign in')
@ -25,6 +27,8 @@ def main():
list_radios() list_radios()
if selected == 'Artists': if selected == 'Artists':
list_artists() list_artists()
if selected == 'Albums':
list_albums()
if selected == 'Switch instance': if selected == 'Switch instance':
with open('config.json', 'rt') as f: with open('config.json', 'rt') as f:
conf = json.loads(f.read()) conf = json.loads(f.read())