mirror of
http://gitea.phreedom.club/localhost_frssoft/funkwlmpv
synced 2024-11-27 00:51:28 +00:00
Compare commits
2 commits
17607c7100
...
3124613c3a
Author | SHA1 | Date | |
---|---|---|---|
localhost_frssoft | 3124613c3a | ||
localhost_frssoft | ec26772089 |
3
MIRRORS
Normal file
3
MIRRORS
Normal file
|
@ -0,0 +1,3 @@
|
|||
# Avalaible mirrors
|
||||
https://inex.dev/localhost_frssoft/funkwhale-cli.git
|
||||
https://git.poridge.club/localhost_frssoft/funkwhale-cli.git
|
|
@ -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...')
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue