From ef41e8c9a54119628aa8cffb193e42782e69563f Mon Sep 17 00:00:00 2001 From: David Vazgenovich Shakaryan Date: Thu, 5 Feb 2026 20:50:31 -0800 Subject: support searching currently playing programmes --- rt.lua | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'rt.lua') diff --git a/rt.lua b/rt.lua index f68d89f..8ed3dc9 100644 --- a/rt.lua +++ b/rt.lua @@ -621,6 +621,9 @@ function rt.open_option_info(opt) end end +local F_NAME = {name = true} +local F_INFO = {info = true} +local F_BOTH = {name = true, info = true} local function search_text_transform(f, ...) local menu = state:menu() local str, pos = f(menu.search_text, menu.search_cursor, ...) @@ -642,14 +645,20 @@ local function search_text_transform(f, ...) local fm = prefix:find('m') local fs = prefix:find('s') local fg = prefix:find('g') + local fe = prefix:find('e') filter = function(v) - return fc and (v.stream_type == 'live' or - v.stream_type == 'radio_streams') or + local fields + local ch = v.stream_type == 'live' or + v.stream_type == 'radio_streams' + local name = fc and ch or fm and v.stream_type == 'movie' or fs and v.group_type == 'series' or fg and v.type == 'group' and v.group_type ~= 'series' + local info = fe and ch and v.info + return name and (info and F_BOTH or F_NAME) or + info and F_INFO end end -- cgit v1.2.3-70-g09d2