There’s no mpv community to share this to, so I figured the next best place was here.

I wrote a script that does two things:

  • Saves the watch_later file for the currently playing file every X seconds, if the file is not currently paused.
  • Saves a “watched” dummy file when the currently playing file exceeds a certain percentage of watch time.

Normally mpv saves the watch_later file for the currently playing file only if you gracefully quit. This isn’t reliable enough for my tastes, so this timer makes better sure my last position is saved.

The second addition is purely for the benefit of additional scripting, inside or outside of mpv. The mpv-created watch_later files are intended to be impermanent, and I believe depending on settings are automatically removed once a file is played to 100%. I personally still want to keep track that I watched a specific video, even when the watch_later file is reset.

It probably goes without saying, but this script has only been tested in Linux.

  • promitheas
    link
    fedilink
    arrow-up
    2
    ·
    1 month ago

    Excuse me if this is a stupid question, but is this something that would be used to achieve the functionality of something like chezmoi? Basically a dotfile manager?

    • Dr. Wesker@lemmy.sdf.orgOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      edit-2
      1 month ago

      The current state of the repo still requires quite a bit of manual finagling, but I’ve tried to make everything as clean cut and modular as possible.

      The plan has always been once the configurations mature, to then create scripts that automate the process of not only installing expected packages, but also allow for limited theming.

      I’ve not quite gotten to that phase, but it is quickly approaching.