this post was submitted on 16 Oct 2024
38 points (100.0% liked)

Linux

48044 readers
776 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

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.

top 5 comments
sorted by: hot top controversial new old
[–] [email protected] 2 points 3 weeks ago (1 children)

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?

[–] [email protected] 2 points 3 weeks ago* (last edited 3 weeks 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.

[–] [email protected] 2 points 3 weeks ago (1 children)

I like your description of yt-dlp

[–] [email protected] 1 points 3 weeks ago

Haha, thanks.

[–] [email protected] 1 points 3 weeks ago