mirror of
https://gitea.phreedom.club/localhost_frssoft/funkwlmpv
synced 2024-11-27 17:43:02 +00:00
download visible
This commit is contained in:
parent
a4694a4dbe
commit
b0d4d3976e
@ -62,7 +62,6 @@ def radio_load(id_radio=None, type_radio='custom'):
|
||||
radio_task.start()
|
||||
while True:
|
||||
try:
|
||||
input()
|
||||
select = fzf.prompt(('Next', 'Prev', 'Pause', 'Download', 'Exit'), f'--header=\'Radio playing...\'')[0]
|
||||
if select == 'Next':
|
||||
radio_get_track(radio_session_id)
|
||||
@ -75,7 +74,9 @@ def radio_load(id_radio=None, type_radio='custom'):
|
||||
else:
|
||||
player.pause = True
|
||||
elif select == 'Download':
|
||||
download_track(player.filename)
|
||||
print('Downloading...')
|
||||
name_downloaded = download_track(player.filename)
|
||||
print(f'Downloaded: {name_downloaded}')
|
||||
elif select == 'Exit':
|
||||
try:
|
||||
radio_event_gen.clear()
|
||||
|
@ -19,4 +19,4 @@ def download_track(url, name=None):
|
||||
|
||||
with open(name, 'wb') as f:
|
||||
f.write(r.content)
|
||||
|
||||
return name
|
||||
|
Loading…
Reference in New Issue
Block a user