[Feature Request] Fetch title of the playing video using mpv's `media-title`
For some reason it would pick up mkv's title property instead of mpv's media-title.
So to make it clear, I have many video that has title metadata on the file itself (on a mkv container), and usually I create a playlist file and set the title to the appropriate one, and I created a mpv script to force the media title to be the playlist title.
It works, even when I do print-text "${media-title}" on mpv's console, it would outputted the title that I wanted, even the window title is called that way.
But for some reason MPRIS still shows me the old (the "embedded") title metadata. Is it because your script read the title on the file tags itself? (see screenshot)
I would like to make the mpris title the same as the media-title on mpv. Thanks.
Proposed implementation
mpris.c line 410-413
// initial value. Replaced with metadata value if available
add_metadata_item_string(ud->mpv, &dict, "media-title", "xesam:title");
- add_metadata_item_string(ud->mpv, &dict, "metadata/by-key/Title", "xesam:title");
The xesam:title should be handled upstream, as mpv already implements overwriting media-title when metadata:title exists. Additionally, mpv supports --force-media-title.
By removing our overwrite, we align mpv-mpris with user expectations and support mpv's built-in title handling.
MPV's priority for media-title = force-media-title->metadata:title->filename