summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorRetusthese <84878539+Retusthese@users.noreply.github.com>2021-05-26 21:15:16 -0400
committeravih <avih@users.noreply.github.com>2021-05-27 09:12:38 +0300
commit6abb7e385f8f2f22511da13fe506a2cbdf7f5584 (patch)
treeed072f6db1ca106fa04b223f03998904967f8d07 /player
parentc68b9424d69a6e74bea46e283eca18de6596d51f (diff)
downloadmpv-6abb7e385f8f2f22511da13fe506a2cbdf7f5584.tar.bz2
mpv-6abb7e385f8f2f22511da13fe506a2cbdf7f5584.tar.xz
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.
Diffstat (limited to 'player')
-rw-r--r--player/lua/osc.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/player/lua/osc.lua b/player/lua/osc.lua
index bea95e1323..95c61025fe 100644
--- a/player/lua/osc.lua
+++ b/player/lua/osc.lua
@@ -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)