summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChrisK2 <spam@kalania.de>2014-07-10 11:22:05 +0200
committerChrisK2 <spam@kalania.de>2014-07-10 11:22:05 +0200
commit1e8b98af73ec100aea13006b8ef9df506366dcb0 (patch)
treec85f123566554cd679aae69ca761be7404b2303b
parent549afdb9c5a5183f9d77c00140ab2e12ba13cd1f (diff)
downloadmpv-1e8b98af73ec100aea13006b8ef9df506366dcb0.tar.bz2
mpv-1e8b98af73ec100aea13006b8ef9df506366dcb0.tar.xz
osc: improve previous commit
-rw-r--r--player/lua/osc.lua9
1 files changed, 3 insertions, 6 deletions
diff --git a/player/lua/osc.lua b/player/lua/osc.lua
index 4a41806217..c00ef4a95b 100644
--- a/player/lua/osc.lua
+++ b/player/lua/osc.lua
@@ -920,12 +920,9 @@ function osc_init()
local eventresponder = {}
local contentF = function (ass)
- local cache = mp.get_property_osd("cache")
- if not (cache == nil) then
- cache = tonumber(cache)
- if (cache < 45) then
- ass:append("Cache: " .. (math.floor(cache)) .."%")
- end
+ local cache = mp.get_property_number("cache")
+ if not (cache == nil) and (cache < 45) then
+ ass:append("Cache: " .. (math.floor(cache)) .."%")
end
end
register_button(posX, bottomrowY, 5, 110, 18, osc_styles.timecodes, contentF, eventresponder, metainfo)