Compare commits

..

2 commits

3 changed files with 13 additions and 3 deletions

3
MIRRORS Normal file
View file

@ -0,0 +1,3 @@
# Avalaible mirrors
https://inex.dev/localhost_frssoft/funkwhale-cli.git
https://git.poridge.club/localhost_frssoft/funkwhale-cli.git

View file

@ -102,11 +102,16 @@ def radio_load(id_radio=None, type_radio='custom', name=None, related_object=Non
radio_task = threading.Thread(target=radio_generator, args=(radio_session_id,), daemon=True)
radio_task.start()
player_items_menu = ['Next', 'Prev', 'Pause', 'Download', 'Info']
if show_like_button:
player_items_menu.append('Like')
player_items_menu.extend(['Hide artist', 'Exit'])
while True:
try:
if player.pause:
player_items_menu[2] = 'Play'
else:
player_items_menu[2] = 'Pause'
select = fzf.prompt(player_items_menu, f"--header=\'Radio {name} playing...\'")[0]
if select == 'Next':
playlist_remaining = len(player.playlist) - player.playlist_current_pos
@ -117,10 +122,8 @@ def radio_load(id_radio=None, type_radio='custom', name=None, related_object=Non
player.playlist_prev()
elif select in ('Pause', 'Play'):
if player.pause:
player_items_menu[2] = 'Pause'
player.pause = False
else:
player_items_menu[2] = 'Play'
player.pause = True
elif select == 'Download':
print('Downloading...')

View file

@ -38,6 +38,10 @@ def player_menu(header='', storage={}):
try:
player_items_menu = ['Next', 'Prev', 'Pause',
'Download', 'Info']
if player.pause:
player_items_menu[2] = 'Play'
else:
player_items_menu[2] = 'Pause'
if show_like_button:
player_items_menu.append('Like')
player_items_menu.extend(['Hide artist', 'Exit'])
@ -47,7 +51,7 @@ def player_menu(header='', storage={}):
player.playlist_next()
elif select == 'Prev':
player.playlist_prev()
elif select == 'Pause':
elif select in ('Pause', 'Play'):
if player.pause:
player.pause = False
else: