Favorite playlists for MPV
I made my first Lua script for MPV which reacts to a keyboard
shortcut and stores the currently playing file in the playlist
favorites.m3u in the same folder where the currently played file is
located.
For now, it can only create the playlist and add new entries into it. The implementation is brute forced and crude, but it works (at the moment). I checked the internet for ready to use scripts for MPV but I could not find any which would do this simple thing, everything seemed to be aiming for a different purpose (e.g. bookmark timestamps in the video instead of the video itself, or things were too complicated) so I decided to play with MPV scripting and put together my own thing.
My little script can be found on my Gitea instance, but
most probably only git clone will work as I was forced to enable the
expensive Gitea option to limit cursed bots (there are better ways
to do this, but all of them require more time, which I am not going to
invest into it).
My usage after initially marking some files as favorite is to run them all as:
mpv $(find -name favorites.m3u)
This might be way too crude, but works for now. (potential issues with spaces and other stuff, but it works now.)
Conclusion
It is these little things which make my mood a bit better.