summaryrefslogtreecommitdiff
path: root/epg.lua
diff options
context:
space:
mode:
Diffstat (limited to 'epg.lua')
-rw-r--r--epg.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/epg.lua b/epg.lua
index c7af266..a3d84f2 100644
--- a/epg.lua
+++ b/epg.lua
@@ -66,4 +66,17 @@ function mt:scheduled_programme(ch, time)
end
end
+function mt:next_programme(ch, time)
+ local progs = self.channels[ch]
+ if not progs then
+ return
+ end
+
+ for _, v in ipairs(progs) do
+ if v.start > time then
+ return v
+ end
+ end
+end
+
return epg