diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-12-24 13:54:03 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-12-24 13:54:03 +0900 |
| commit | 28e8bdf7f8286bd431b7f3b709e79f3827b31469 (patch) | |
| tree | 85b44eff6da4d8443198fb6e04dfb6ee55244588 /debian/.config/mpv/scripts/reload.lua | |
| parent | 8470ff001befcfd0f626dea69a9e76d43aee0511 (diff) | |
updates
Diffstat (limited to 'debian/.config/mpv/scripts/reload.lua')
| -rw-r--r-- | debian/.config/mpv/scripts/reload.lua | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/debian/.config/mpv/scripts/reload.lua b/debian/.config/mpv/scripts/reload.lua new file mode 100644 index 0000000..dc449ec --- /dev/null +++ b/debian/.config/mpv/scripts/reload.lua @@ -0,0 +1,19 @@ +--[[ + reload / by sibwaf / https://github.com/sibwaf/mpv-scripts + + Reopens the current playing file and seeks to the same timestamp on a button press ([Shift+R] by default). + Useful for situations when you are watching YouTube/streams and your connection breaks for some reason. + + MIT license - do whatever you want, but I'm not responsible for any possible problems. + Please keep the URL to the original repository. Thanks! +]] + +function reload() + local path = mp.get_property("path") + if path ~= nil then + local time = mp.get_property_number("time-pos") + mp.commandv("loadfile", path, "replace", "start=" .. time) + end +end + +mp.add_key_binding("R", "reload", reload) |
