summaryrefslogtreecommitdiff
path: root/osd.lua
diff options
context:
space:
mode:
Diffstat (limited to 'osd.lua')
-rw-r--r--osd.lua14
1 files changed, 6 insertions, 8 deletions
diff --git a/osd.lua b/osd.lua
index 58c6903..7075a73 100644
--- a/osd.lua
+++ b/osd.lua
@@ -235,8 +235,9 @@ function mt:option_text(opt, info)
str = col .. '[' .. str .. ']'
end
- if opt.info and #opt.info > 0 then
- str = str .. colour.info .. ' (' .. asscape(opt.info) .. ')'
+ local opt_info = opt.info
+ if opt_info and #opt_info > 0 then
+ str = str .. colour.info .. ' (' .. asscape(opt_info) .. ')'
end
return str
@@ -542,6 +543,8 @@ function mt:render()
end
function mt:redraw(state)
+ self.redraw_time = os.time()
+
local out_titles = {}
local out_options = {}
@@ -574,15 +577,10 @@ function mt:redraw(state)
#menu.options) do
local opt = menu.options[i]
- -- use real-time count for favourites
- if opt.id == 'favourites' then
- opt.info = tostring(#state.favourites)
- end
-
local selected = i == menu.cursor and not menu.search_active
local info = {
selected = selected,
- empty = (opt.type == 'group' and not opt.lazy and
+ empty = (opt.type == 'group' and opt.children and
#opt.children == 0),
playing = not not (
opt.id and opt.id == state.playing_id),