mirror of https://github.com/mpv-player/mpv
stats.lua: display file tags
This adds file tags to display along with the title, including album/artist etc. for music, and series etc. for some videos. The list of tags to display is identical to the tags printed to the terminal and is controlled by the --display-tags option.
This commit is contained in:
parent
1a495451ab
commit
06413df577
|
@ -644,6 +644,13 @@ local function add_file(s)
|
|||
append_property(s, "media-title", {prefix="Title:"})
|
||||
end
|
||||
|
||||
local tags = mp.get_property_native("display-tags")
|
||||
for _, tag in pairs(tags) do
|
||||
if tag ~= "Title" then
|
||||
append_property(s, "metadata/" .. tag, {prefix=string.gsub(tag, "_", " ") .. ":"})
|
||||
end
|
||||
end
|
||||
|
||||
local editions = mp.get_property_number("editions")
|
||||
local edition = mp.get_property_number("current-edition")
|
||||
local ed_cond = (edition and editions > 1)
|
||||
|
|
Loading…
Reference in New Issue