Description visible in radios

This commit is contained in:
localhost_frssoft 2022-11-24 01:48:59 +03:00
parent d64d251ea7
commit b4998074b2

View File

@ -23,7 +23,11 @@ def list_radios():
index = results.index(i)
id_radio = i.get('id')
name = i.get('name')
view.append(f'{index}.{name}')
descr = i.get('description')
radio_option = name
if descr and descr != "":
radio_option += f' | {descr}'
view.append(f'{index}.{radio_option}')
if s.headers.get('Authorization'): # Radios avalaible only for auth user
view.append('Favourites')
view.append('Less listened')
@ -32,7 +36,7 @@ def list_radios():
view.append('Users')
view.append('Recently Added')
selected = fzf.prompt(view, f'--header \'Found {count} radios\'')[0].split('.', 1)
selected = fzf.prompt(view, f'--header \'Found {count} radios\' --read0', delimiter="\0")[0].split('.', 1)
if 'Favourites' in selected:
radio_load(id_radio, 'favorites')
elif 'Random' in selected: