From 3a22602235dd6db51c93131bf0685a13f3852918 Mon Sep 17 00:00:00 2001 From: Dario Ernst Date: Sat, 22 Jun 2019 23:09:53 +0200 Subject: [PATCH] Add chapter seeking buttons Additionally to seeking and skipping files, seeking chapters is useful too. Users might want to quickly navigate to where they left off in a full-length movie, or skip repeating intro/outro sections of TV series. --- webui-page/index.html | 11 +++++++++++ webui.lua | 8 ++++++++ 2 files changed, 19 insertions(+) diff --git a/webui-page/index.html b/webui-page/index.html index 90d963e9..a213ded6 100644 --- a/webui-page/index.html +++ b/webui-page/index.html @@ -91,6 +91,17 @@

Album

+
+
+ +
+
+
+
+ +
+
+
diff --git a/webui.lua b/webui.lua index 5373e130..9f1aaaf8 100644 --- a/webui.lua +++ b/webui.lua @@ -137,6 +137,14 @@ local commands = { cycle_audio_device = function() return pcall(mp.command, "cycle_values audio-device " .. options.audio_devices) + end, + + add_chapter = function(num) + local valid, msg = validate_number_param(num) + if not valid then + return true, false, msg + end + return pcall(mp.command, 'add chapter '..num) end }