summaryrefslogtreecommitdiff
path: root/rx.lua
diff options
context:
space:
mode:
authorDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2026-01-29 22:27:41 -0800
committerDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2026-01-29 22:27:41 -0800
commit2451df1a217c49b471895941fb1734a25d55ba5c (patch)
tree097eaee759618ec0ba7c2af1560440ad73def850 /rx.lua
parent28068fb57dc1e0aff22f6de3c79ee3f9d8ffa65d (diff)
downloadmpv-iptv-menu-2451df1a217c49b471895941fb1734a25d55ba5c.tar.gz
mpv-iptv-menu-2451df1a217c49b471895941fb1734a25d55ba5c.tar.xz
dim past programmes in EPGHEADmaster
Diffstat (limited to 'rx.lua')
-rw-r--r--rx.lua21
1 files changed, 15 insertions, 6 deletions
diff --git a/rx.lua b/rx.lua
index 007ca13..c509559 100644
--- a/rx.lua
+++ b/rx.lua
@@ -240,19 +240,28 @@ end
local programme_mt = {
__index = function(t, k)
- if k == 'active' then
+ if k == 'active' or k == 'ended' then
local time = osd.redraw_time
if t._exp and time < t._exp then
- return t._active
+ if k == 'active' then
+ return t._active
+ end
+ return t._ended
end
local v = t.programme
- local ret = time >= v.start and time < v.stop
+ local ended = time >= v.stop
+ local active = not ended and time >= v.start
local exp = time < v.start and v.start or
- ret and v.stop or nil
- rawset(t, exp and '_active' or 'active', ret)
+ active and v.stop or nil
+ rawset(t, exp and '_active' or 'active', active)
+ rawset(t, exp and '_ended' or 'ended', ended)
rawset(t, '_exp', exp)
- return ret
+
+ if k == 'active' then
+ return active
+ end
+ return ended
end
end,
}