mirror of
https://github.com/mpv-player/mpv
synced 2025-01-03 21:42:18 +00:00
osc: re-initialize when chapter list changes
When the OSC initializes, it checks whether the current video has chapters, and if it does not, it disables its chapter functionality (chapter buttons are grayed out and unusable, chapter indicators don't show on the seek bar). If another script changed the chapter list after the video has loaded, those changes would be ignored by the OSC until some other event causes it to re-initialize, because it did not observe the chapter list property. This is fixed by adding observation of chapter-list alongside the other properties that trigger re-initialization.
This commit is contained in:
parent
c68b9424d6
commit
6abb7e385f
@ -2598,6 +2598,7 @@ mp.register_event("shutdown", shutdown)
|
||||
mp.register_event("start-file", request_init)
|
||||
mp.observe_property("track-list", nil, request_init)
|
||||
mp.observe_property("playlist", nil, request_init)
|
||||
mp.observe_property("chapter-list", nil, request_init)
|
||||
|
||||
mp.register_script_message("osc-message", show_message)
|
||||
mp.register_script_message("osc-chapterlist", function(dur)
|
||||
|
Loading…
Reference in New Issue
Block a user