mirror of
https://gitea.phreedom.club/localhost_frssoft/funkwlmpv
synced 2024-11-15 19:53:02 +00:00
Radio name playing
This commit is contained in:
parent
9d1e9b149c
commit
2daed6599b
@ -38,7 +38,8 @@ def list_radios():
|
||||
else:
|
||||
id_selected = selected[0]
|
||||
id_radio = results[int(id_selected)].get('id')
|
||||
radio_load(id_radio)
|
||||
name_radio = results[int(id_selected)].get('name')
|
||||
radio_load(id_radio, name=name_radio)
|
||||
|
||||
|
||||
def radio_generator(radio_session_id):
|
||||
@ -55,7 +56,7 @@ def radio_generator(radio_session_id):
|
||||
|
||||
radio_event_gen = threading.Event()
|
||||
|
||||
def radio_load(id_radio=None, type_radio='custom'):
|
||||
def radio_load(id_radio=None, type_radio='custom', name=None):
|
||||
requested_radio = {
|
||||
'custom_radio': id_radio,
|
||||
'radio_type': type_radio,
|
||||
@ -71,7 +72,7 @@ def radio_load(id_radio=None, type_radio='custom'):
|
||||
radio_task.start()
|
||||
while True:
|
||||
try:
|
||||
select = fzf.prompt(('Next', 'Prev', 'Pause', 'Download', 'Exit'), f'--header=\'Radio playing...\'')[0]
|
||||
select = fzf.prompt(('Next', 'Prev', 'Pause', 'Download', 'Exit'), f"--header=\'Radio {name} playing...\'")[0]
|
||||
if select == 'Next':
|
||||
radio_get_track(radio_session_id)
|
||||
player.playlist_next()
|
||||
|
Loading…
Reference in New Issue
Block a user