From 24b0b24ad953895e84923e48bd417c3cae24cf75 Mon Sep 17 00:00:00 2001 From: localhost_frssoft Date: Fri, 30 Dec 2022 02:43:11 +0300 Subject: [PATCH] Fix display caption loading track: event based now --- src/mpv_control.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/mpv_control.py b/src/mpv_control.py index be7402e..42fe986 100644 --- a/src/mpv_control.py +++ b/src/mpv_control.py @@ -65,12 +65,11 @@ def osd_observer(_name, value): print_there(0, 0, '\r'+osd_string[:term_len]) -@player.property_observer('stream-open-filename') +@player.event_callback('start-file') @logger.catch -def waiting_load_observer(_name, value): +def starting_file_handler(value): '''just show loading state''' - if value and player.core_idle: - print_there(0, 0, '\rLoading track...') + print_there(0, 0, '\rLoading track...') @player.property_observer('percent-pos')