From b4998074b2395a38aa9e18ef2b3f00791fe84736 Mon Sep 17 00:00:00 2001 From: localhost_frssoft Date: Thu, 24 Nov 2022 01:48:59 +0300 Subject: [PATCH] Description visible in radios --- src/fw_radios.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/fw_radios.py b/src/fw_radios.py index 45e61b7..2262821 100644 --- a/src/fw_radios.py +++ b/src/fw_radios.py @@ -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: