mirror of
https://gitea.phreedom.club/localhost_frssoft/funkwlmpv
synced 2024-12-23 09:13:32 +02:00
Description visible in radios
This commit is contained in:
parent
d64d251ea7
commit
b4998074b2
1 changed files with 6 additions and 2 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue