Hi, thanks for all your work on this component. Is there a way to simply display something like:
<Artist>
<Title>
from a currently playing MP3 song, where the <artist> and <title> are read from the ID3 tags?
Right now, I can only seem to display "File: artwork://" as the name of the video, using the mpv-stats OSC.
Any help would be greatly appreciated.
You can do it using a lua script. Create a script in the mpv scripts folder, eg. <foobar profile>/mpv/scripts/my_osd.lua containing something like:
mp.register_script_message("foobar", function(cmd, arg1, arg2, ...)
if (cmd == "titleformat" and (not(arg1 == nil))) then
if (arg1 == "myosd" and (not(arg2 == nil))) then
mp.osd_message(arg2,999999)
end
end
end)
mp.commandv("script-message", "foobar", "register-titleformat", "myosd", "%artist% - %title%")
And reload mpv (hold shift + View->mpv Commands->Restart mpv) or restart foobar. The above is just a minimal example, you could handle the display in mpv more nicely depending on how you want it to work.