diff options
Diffstat (limited to 'content')
-rw-r--r-- | content/17/index.md | 2 | ||||
-rw-r--r-- | content/20/index.md | 66 | ||||
-rw-r--r-- | content/8/index.md | 2 |
3 files changed, 68 insertions, 2 deletions
diff --git a/content/17/index.md b/content/17/index.md index 2c79af6..f37ba18 100644 --- a/content/17/index.md +++ b/content/17/index.md @@ -3,7 +3,7 @@ date = 2022-02-13T18:25:11+01:00 title = "Getting MPD to parse TIT1 in MP3 files" [taxonomies] -tags = ["TIL"] +tags = ["bugs"] +++ I have a pretty extensive music library that I manage with MPD, the [Music diff --git a/content/20/index.md b/content/20/index.md new file mode 100644 index 0000000..fbc99c1 --- /dev/null +++ b/content/20/index.md @@ -0,0 +1,66 @@ ++++ +date = 2024-09-19T22:45:36+02:00 +title = "List mpv(1)'s watch_later entries with later(1)" + +[taxonomies] +tags = ["projects", "later(1)"] + +[extra] +related = [] ++++ + +If you are like me then you have a basically never-ending backlog of videos to +watch. Perhaps sometimes you even watch videos so long that they're basically +impossible to finish in one sitting. Or you have about an hour left on a video, +but you should really go to sleep. + +All of these require some way to remember the timestamp where you left off. I +use [`mpv(1)`](https://mpv.io/) to watch my videos and thankfully there is a +built-in way to do this. By default, hitting `Q` will quit the video and +remember the timestamp ([among other +settings](https://mpv.io/manual/stable/#resuming-playback)) for next time you +open the file. This works regardless of whether the video exists on your +filesystem or is streamed from a URL. + +After a while of using this you might amass more than a couple of unfinished +videos that `mpv(1)` knows about, but what it sadly does not provide is an easy +way to show you which videos those are... + +Whilst you can set +[`write-filename-in-watch-later-config`](https://mpv.io/manual/stable/#options-write-filename-in-watch-later-config) +and have `mpv(1)` save filenames and URLs in its watch later entries, quickly +finding them is another story. + +This is where a shared effort between my partner +[nortti](https://ahti.space/~nortti/) and me comes in: +[`later(1)`](https://git.oriole.systems/later/about/). It is a small Python +script that parses `mpv(1)`'s [watch +later](https://mpv.io/manual/stable/#watch-later) entries and displays them in a +human-readable and pretty manner: + +``` +albatross ~$ later +Sep 19 19:50 https://www.youtube.com/watch?v=VKGtMK4CGV4 # The 2 Hour Hunt for Light Arrows - OoT Randomizer +Sep 19 22:30 /home/wolf/Mall Grab - Understand feat. Brendan Yates.webm +``` + +From here it is easy to open up the video you want to continue watching: simply +paste the path or URL printed by `later(1)` into `mpv(1)`. + +You might notice that the YouTube video is commented with its title. This is not +information that `mpv(1)` saves, but `later(1)` can help here too. Using the +`-u` or `--update-titles` flag, it will extract video titles using +[`yt-dlp(1)`](https://github.com/yt-dlp/yt-dlp) and save them in its cache for +subsequent retrieval. This should work for any site that `yt-dlp(1)` itself +supports. + +If you have a Python available, setting up and using `later(1)` is trivial: +simply copy the script into a directory in your `$PATH` (and the manual into +`$MANPATH`) or use the `Makefile`: + +``` +$ PREFIX=~/.local make install +``` + +Do note that for `later(1)` to work correctly, the aforementioned +`write-filename-in-watch-later-config` setting needs to be set. diff --git a/content/8/index.md b/content/8/index.md index 7bfcbb0..ac4b147 100644 --- a/content/8/index.md +++ b/content/8/index.md @@ -10,7 +10,7 @@ related = [9] +++ When maintaining a project sooner or later there comes the time when you need to -apply patches that have been submitted to you. Assuming a patch-based workflow +apply patches that have been submitted to you. Assuming a patch-based workflow, those are going to be one patch per mail, possibly connected in a thread. There's lots of different ways of getting those patches to their final destination, [`git-am(1)`](https://git-scm.com/docs/git-am), and in this post I |