Compare commits

..

No commits in common. "24b0b24ad953895e84923e48bd417c3cae24cf75" and "b07d9624364eea2a0f85a0fa47e95ba2751f8992" have entirely different histories.

View File

@ -65,11 +65,12 @@ def osd_observer(_name, value):
print_there(0, 0, '\r'+osd_string[:term_len]) print_there(0, 0, '\r'+osd_string[:term_len])
@player.event_callback('start-file') @player.property_observer('stream-open-filename')
@logger.catch @logger.catch
def starting_file_handler(value): def waiting_load_observer(_name, value):
'''just show loading state''' '''just show loading state'''
print_there(0, 0, '\rLoading track...') if value and player.core_idle:
print_there(0, 0, '\rLoading track...')
@player.property_observer('percent-pos') @player.property_observer('percent-pos')
@ -86,13 +87,8 @@ def universal_observer(_name, value):
else: else:
track_size = '?' track_size = '?'
if player.cache_speed: if player.cache_speed:
speed_load = player.cache_speed cache_speed = int(player.cache_speed/1024/1024*8)
if speed_load >= 3*1024*1024: cache_speed = f'| ~{cache_speed}Mbit/s'
cache_speed = '| <<<'
elif speed_load >= 1*1024*1024:
cache_speed = '| <<*'
else:
cache_speed = '| <=>'
else: else:
cache_speed = '' cache_speed = ''
if player.playlist_count > -1: if player.playlist_count > -1: