mirror of
https://gitea.phreedom.club/localhost_frssoft/funkwlmpv
synced 2024-11-23 23:19:21 +02:00
Compare commits
No commits in common. "8fa1773807f44094520d330a619565a6139ea243" and "c232fd546b3841a837a1f0dc7812d5edeb4cb20b" have entirely different histories.
8fa1773807
...
c232fd546b
|
@ -123,7 +123,8 @@ def radio_load(id_radio=None, type_radio='custom', name=None, related_object=Non
|
|||
select = fzf.prompt(player_items_menu,
|
||||
f"--header=\'Radio {name} playing...\'")[0]
|
||||
if select == 'Next':
|
||||
playlist_remaining = player.playlist_count - player.playlist_current_pos
|
||||
playlist_remaining = len(
|
||||
player.playlist) - player.playlist_current_pos
|
||||
if playlist_remaining <= 2:
|
||||
threading.Thread(target=radio_get_track, args=(
|
||||
radio_session_id,), daemon=True).start()
|
||||
|
|
|
@ -77,26 +77,22 @@ def waiting_load_observer(_name, value):
|
|||
@logger.catch
|
||||
def universal_observer(_name, value):
|
||||
if value:
|
||||
percent = int(value)
|
||||
if player.audio_bitrate:
|
||||
kbps = int(player.audio_bitrate/1024)
|
||||
kbps = round(player.audio_bitrate/1024, 1)
|
||||
else:
|
||||
kbps = '?'
|
||||
percent = int(value)
|
||||
if player.file_size:
|
||||
track_size = round(player.file_size/1024/1024, 1)
|
||||
else:
|
||||
track_size = '?'
|
||||
if player.cache_speed:
|
||||
cache_speed = int(player.cache_speed/1024/1024*8)
|
||||
cache_speed = f'| ~{cache_speed}Mbit/s'
|
||||
cache_speed = round(player.cache_speed/1024/1024*8, 1)
|
||||
cache_speed = f'| caching: ~{cache_speed}Mbit/s'
|
||||
else:
|
||||
cache_speed = ''
|
||||
if player.playlist_count > -1:
|
||||
player_pos = f'{player.playlist_current_pos}/{player.playlist_count}'
|
||||
else:
|
||||
player_pos = '-/-'
|
||||
print_there(2, 2, f'\r'+' '*get_terminal_size().columns)
|
||||
print_there(2, 2, f'\r{player_pos} | {kbps} kbps | {percent}% | {track_size}MB {cache_speed}')
|
||||
print_there(2, 2, f'\r{kbps} kbps | {percent}% | {track_size}MB {cache_speed}')
|
||||
time.sleep(1)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue