Created
September 6, 2021 10:35
-
-
Save bitingsock/0f22c631295273d5a53e4337c25fe161 to your computer and use it in GitHub Desktop.
keybind to rewind to the end of the previous playlist entry
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local optStart = 0 | |
function seekHandler(duration) | |
if mp.get_property_number("playlist-pos") > 0 then | |
optStart = mp.get_property("start") | |
mp.set_property("start", duration) | |
mp.command("playlist-prev") | |
end | |
end | |
mp.register_event("file-loaded", function() mp.set_property("start", optStart) end) | |
mp.add_key_binding("Ctrl+left","rewindPlaylist",function() seekHandler(-5) end) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment