From 1e8b98af73ec100aea13006b8ef9df506366dcb0 Mon Sep 17 00:00:00 2001 From: ChrisK2 Date: Thu, 10 Jul 2014 11:22:05 +0200 Subject: osc: improve previous commit --- player/lua/osc.lua | 9 +++------ 1 file 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) -- cgit v1.2.3