mirror of https://github.com/mpv-player/mpv
Revert "osc: make the title toggleable between media-title and filename"
This reverts commit 6573b73462
.
This commit is contained in:
parent
265547eb94
commit
ebf61267f4
|
@ -46,8 +46,8 @@ title
|
|||
| Displays current media-title or filename
|
||||
|
||||
============= ================================================
|
||||
left-click toggle displaying media-title or filename
|
||||
right-click show playlist position and length and filename
|
||||
left-click show playlist position and length and full title
|
||||
right-click show filename
|
||||
============= ================================================
|
||||
|
||||
cache
|
||||
|
@ -239,12 +239,6 @@ Configurable Options
|
|||
|
||||
Duration of fade out in ms, 0 = no fade
|
||||
|
||||
``prefertitle``
|
||||
Default: yes
|
||||
|
||||
Display media title if available (yes) or always display the
|
||||
filename (no).
|
||||
|
||||
``tooltipborder``
|
||||
Default: 1
|
||||
|
||||
|
|
|
@ -34,7 +34,6 @@ local user_opts = {
|
|||
layout = "bottombar",
|
||||
seekbarstyle = "bar", -- slider (diamond marker), knob (circle
|
||||
-- marker with guide), or bar (fill)
|
||||
prefertitle = true, -- show media-title (true) or filename (false)
|
||||
tooltipborder = 1, -- border of tooltip in bottom/topbar
|
||||
timetotal = false, -- display total time instead of remaining time?
|
||||
timems = false, -- display timecodes with milliseconds?
|
||||
|
@ -102,7 +101,6 @@ local state = {
|
|||
enabled = true,
|
||||
input_enabled = true,
|
||||
showhide_enabled = false,
|
||||
prefertitle = user_opts.prefertitle
|
||||
}
|
||||
|
||||
|
||||
|
@ -1513,18 +1511,16 @@ function osc_init()
|
|||
ne = new_element("title", "button")
|
||||
|
||||
ne.content = function ()
|
||||
return (state.prefertitle) and
|
||||
mp.get_property_osd("media-title", "mpv") or
|
||||
mp.get_property_osd("filename", "mpv")
|
||||
local title = mp.get_property_osd("media-title")
|
||||
if not (title == nil) then
|
||||
return (title)
|
||||
else
|
||||
return ("mpv")
|
||||
end
|
||||
end
|
||||
|
||||
ne.eventresponder["mouse_btn0_up"] = function ()
|
||||
state.prefertitle = not state.prefertitle
|
||||
request_init()
|
||||
end
|
||||
|
||||
ne.eventresponder["mouse_btn2_up"] = function ()
|
||||
local title = mp.get_property_osd("filename")
|
||||
local title = mp.get_property_osd("media-title")
|
||||
if (have_pl) then
|
||||
title = string.format("[%d/%d] %s", countone(pl_pos - 1),
|
||||
pl_count, title)
|
||||
|
@ -1532,6 +1528,9 @@ function osc_init()
|
|||
show_message(title)
|
||||
end
|
||||
|
||||
ne.eventresponder["mouse_btn2_up"] =
|
||||
function () show_message(mp.get_property_osd("filename")) end
|
||||
|
||||
-- playlist buttons
|
||||
|
||||
-- prev
|
||||
|
|
Loading…
Reference in New Issue