mirror of
http://gitea.phreedom.club/localhost_frssoft/funkwlmpv
synced 2024-11-25 11:01:27 +00:00
Radio name playing
This commit is contained in:
parent
9d1e9b149c
commit
2daed6599b
|
@ -38,7 +38,8 @@ def list_radios():
|
||||||
else:
|
else:
|
||||||
id_selected = selected[0]
|
id_selected = selected[0]
|
||||||
id_radio = results[int(id_selected)].get('id')
|
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):
|
def radio_generator(radio_session_id):
|
||||||
|
@ -55,7 +56,7 @@ def radio_generator(radio_session_id):
|
||||||
|
|
||||||
radio_event_gen = threading.Event()
|
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 = {
|
requested_radio = {
|
||||||
'custom_radio': id_radio,
|
'custom_radio': id_radio,
|
||||||
'radio_type': type_radio,
|
'radio_type': type_radio,
|
||||||
|
@ -71,7 +72,7 @@ def radio_load(id_radio=None, type_radio='custom'):
|
||||||
radio_task.start()
|
radio_task.start()
|
||||||
while True:
|
while True:
|
||||||
try:
|
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':
|
if select == 'Next':
|
||||||
radio_get_track(radio_session_id)
|
radio_get_track(radio_session_id)
|
||||||
player.playlist_next()
|
player.playlist_next()
|
||||||
|
|
Loading…
Reference in a new issue