diff options
author | Ricardo Constantino <wiiaboo@gmail.com> | 2017-03-27 17:40:48 +0100 |
---|---|---|
committer | Ricardo Constantino <wiiaboo@gmail.com> | 2017-03-27 18:00:54 +0100 |
commit | ebf61267f4349e28fa97c0c14c66631cbf24efba (patch) | |
tree | a2a9b5220976861222363bd6f01ebcb2e612225d /player | |
parent | 265547eb941bcf48d2c8c9f9e8fbadcec1514a98 (diff) | |
download | mpv-ebf61267f4349e28fa97c0c14c66631cbf24efba.tar.bz2 mpv-ebf61267f4349e28fa97c0c14c66631cbf24efba.tar.xz |
Revert "osc: make the title toggleable between media-title and filename"
This reverts commit 6573b73462e336da0daca845ba4df02782afc2b6.
Diffstat (limited to 'player')
-rw-r--r-- | player/lua/osc.lua | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/player/lua/osc.lua b/player/lua/osc.lua index 6f1fa4eea7..8997ae4ac6 100644 --- a/player/lua/osc.lua +++ b/player/lua/osc.lua @@ -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 |