this post was submitted on 16 Oct 2024
35 points (97.3% liked)

Linux

47941 readers
1542 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.

you are viewing a single comment's thread
view the rest of the comments
[–] xavier666@lemm.ee 2 points 2 weeks ago (1 children)

I like your description of yt-dlp

[–] wesker@lemmy.sdf.org 1 points 2 weeks ago