diff options
| author | Anton Bobov <anton@bobov.name> | 2026-10-23 21:24:09 +0500 |
|---|---|---|
| committer | Anton Bobov <anton@bobov.name> | 2026-10-23 21:24:09 +0500 |
| commit | 06ae6200f1cd0229a1ba9172eb91945e40018fed (patch) | |
| tree | 4073efb3295ef7ec2cc636cb0969d2b15488affe /files/.config | |
| parent | b1771b62c26643d495f3614bada58e0d835f73a0 (diff) | |
mpv: add auto-save-state script
Diffstat (limited to 'files/.config')
| -rw-r--r-- | files/.config/mpv/scripts/auto-save-state.lua | 10 |
1 files changed, 10 insertions, 0 deletions
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) |
