diff options
Diffstat (limited to 'main.lua')
-rw-r--r-- | main.lua | 32 |
1 files changed, 32 insertions, 0 deletions
@@ -907,6 +907,37 @@ local function goto_option() update_osd() end +local function goto_playing() + if not playing_id then + return + end + + local obj = objects[playing_id] + if not obj then + return + end + + local path = {} + local curr = obj + while curr.parent_id and curr.parent_id ~= 'root' and + objects[curr.parent_id] do + curr = objects[curr.parent_id] + path[#path+1] = curr + end + if #path == 0 or curr.parent_id ~= 'root' then + return + end + + depth = 1 + for i = #path, 1, -1 do + cursor_to_object(path[i].id) + push_group_menu(path[i]) + end + + cursor_to_object(obj.id) + update_osd() +end + local function open_epg_programme(prog) local options = { {name='Title: ' .. prog.title}, @@ -1313,6 +1344,7 @@ function bind_menu_keys() bind_key('Ctrl+f', favourite_option) bind_key('g', goto_option) bind_key('?', open_option_info) + bind_key('Ctrl+p', goto_playing) bind_key('UP', cursor_up, {repeatable=true}) bind_key('DOWN', cursor_down, {repeatable=true}) |