aboutsummaryrefslogtreecommitdiff
path: root/files/.config/mpv/scripts/auto-save-state.lua
blob: 1814e35e24870a3c4677b1beb3b4a512a67898ff (plain) (blame)
1
2
3
4
5
6
7
8
9
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)