diff options
author | ChrisK2 <spam@kalania.de> | 2014-07-10 11:22:05 +0200 |
---|---|---|
committer | ChrisK2 <spam@kalania.de> | 2014-07-10 11:22:05 +0200 |
commit | 1e8b98af73ec100aea13006b8ef9df506366dcb0 (patch) | |
tree | c85f123566554cd679aae69ca761be7404b2303b /player/lua | |
parent | 549afdb9c5a5183f9d77c00140ab2e12ba13cd1f (diff) |
osc: improve previous commit
Diffstat (limited to 'player/lua')
-rw-r--r-- | player/lua/osc.lua | 9 |
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) |