From bab1ee9fb8e566b4f7c808c9136d4b3f32e4d600 Mon Sep 17 00:00:00 2001 From: David Vazgenovich Shakaryan Date: Wed, 7 Jan 2026 23:43:57 -0800 Subject: display channel logos in EPG --- main.lua | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'main.lua') diff --git a/main.lua b/main.lua index 6e04001..489d698 100644 --- a/main.lua +++ b/main.lua @@ -548,7 +548,7 @@ local function goto_playing() update_osd() end -local function open_epg_programme(prog) +local function open_epg_programme(prog, img_url) local options = { {name = 'Title: ' .. prog.title}, {name = 'Start: ' .. os.date('%a %d %b %H:%M', prog.start)}, @@ -562,11 +562,14 @@ local function open_epg_programme(prog) end end - state:push_menu({ + local menu = state:push_menu({ options = options, title = 'Programme: ' .. prog.title, type = 'epg', }) + if img_url then + menu.img_url = img_url + end update_osd() end @@ -596,11 +599,14 @@ local function open_option_epg(opt) options[i] = prog end - state:push_menu({ + local menu = state:push_menu({ options = options, title = 'EPG: ' .. opt.name .. ' (' .. ch .. ')', type = 'epg', }) + if opt.img_url then + menu.img_url = opt.img_url + end set_cursor(curr, {centre = true, skip_redraw = true}) update_osd() end @@ -751,7 +757,7 @@ local function open_option_info() end if menu.type == 'epg' and opt.programme then - open_epg_programme(opt.programme) + open_epg_programme(opt.programme, menu.img_url) elseif opt.epg_channel_id then open_option_epg(opt) elseif opt.group_type == 'series' then @@ -886,7 +892,7 @@ local function start_search() menu:set_search_cursor(#menu.search_text + 1) menu:set_cursor(1) else - menu = state:push_menu({ + state:push_menu({ title = title, type = 'search', options = search_menu_options(menu.options), -- cgit v1.2.3-70-g09d2