Skip to content

Instantly share code, notes, and snippets.

@gabrielfern
Created January 25, 2020 01:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gabrielfern/e37c6d22d7760a4373920a3c3701e256 to your computer and use it in GitHub Desktop.
Save gabrielfern/e37c6d22d7760a4373920a3c3701e256 to your computer and use it in GitHub Desktop.
Useful when using mpv with keep-open option, no loop and mpv-mpris
function on_eof(name, value)
if value == true then
mp.set_property("playback-time", 0)
end
end
mp.observe_property("eof-reached", "bool", on_eof)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment