mirror of
https://gitea.phreedom.club/localhost_frssoft/funkwlmpv
synced 2024-11-22 17:09:20 +02:00
Description visible in radios
This commit is contained in:
parent
d64d251ea7
commit
b4998074b2
|
@ -23,7 +23,11 @@ def list_radios():
|
||||||
index = results.index(i)
|
index = results.index(i)
|
||||||
id_radio = i.get('id')
|
id_radio = i.get('id')
|
||||||
name = i.get('name')
|
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
|
if s.headers.get('Authorization'): # Radios avalaible only for auth user
|
||||||
view.append('Favourites')
|
view.append('Favourites')
|
||||||
view.append('Less listened')
|
view.append('Less listened')
|
||||||
|
@ -32,7 +36,7 @@ def list_radios():
|
||||||
view.append('Users')
|
view.append('Users')
|
||||||
view.append('Recently Added')
|
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:
|
if 'Favourites' in selected:
|
||||||
radio_load(id_radio, 'favorites')
|
radio_load(id_radio, 'favorites')
|
||||||
elif 'Random' in selected:
|
elif 'Random' in selected:
|
||||||
|
|
Loading…
Reference in New Issue