From 06ae6200f1cd0229a1ba9172eb91945e40018fed Mon Sep 17 00:00:00 2001 From: Anton Bobov Date: Fri, 23 Oct 2026 21:24:09 +0500 Subject: mpv: add auto-save-state script --- files/.config/mpv/scripts/auto-save-state.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 files/.config/mpv/scripts/auto-save-state.lua (limited to 'files/.config') diff --git a/files/.config/mpv/scripts/auto-save-state.lua b/files/.config/mpv/scripts/auto-save-state.lua new file mode 100644 index 0000000..1814e35 --- /dev/null +++ b/files/.config/mpv/scripts/auto-save-state.lua @@ -0,0 +1,10 @@ +-- auto-save-state.lua +-- Description: Automatically saves MPV playback state periodically. + +local auto_save_interval_sec = 600 + +mp.add_periodic_timer(auto_save_interval_sec, function() + if mp.get_property_bool("seekable") then + mp.command("write-watch-later-config") + end +end) -- cgit v1.2.3