diff options
| author | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2026-02-03 22:42:26 -0800 |
|---|---|---|
| committer | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2026-02-03 22:42:26 -0800 |
| commit | 554e833b1a39ede9aef234449fc8992435f10751 (patch) | |
| tree | 3b5e7cf0077c6b758eafd76a97bfc81f5ba15145 /rx.lua | |
| parent | 6cc548c27470b81114412f3ecd74380894eba72e (diff) | |
| download | mpv-iptv-menu-554e833b1a39ede9aef234449fc8992435f10751.tar.gz mpv-iptv-menu-554e833b1a39ede9aef234449fc8992435f10751.tar.xz | |
support multiple sources
Diffstat (limited to 'rx.lua')
| -rw-r--r-- | rx.lua | 16 |
1 files changed, 10 insertions, 6 deletions
@@ -30,7 +30,8 @@ function rx.series_children(series, info) name = util.strip(episode.title), type = 'stream', stream_type = 'series', - id = series.section .. ':stream:' .. + id = series.src_id .. ':' .. + series.section .. ':stream:' .. episode.id, stream_id = episode.id, img_url = util.strip_ne( @@ -57,7 +58,9 @@ function rx.series_children(series, info) local t = { type = 'group', group_type = 'season', - id = series.id .. ':season:' .. season.id, + id = series.src_id .. ':' .. series.section .. + ':season:' .. series.series_id .. '-' .. + season.id, children = episodes, name = util.strip(season.name), info = count, @@ -95,14 +98,15 @@ local entry_mt = { return t._info end - local prog = ctx.epg:scheduled_programme( + local epg = ctx.src[v.src_id].epg + local prog = epg:scheduled_programme( v.epg_channel_id, time) local ret = prog and prog.title or '' local exp = prog and prog.stop rawset(t, 'active_programme', prog) if not prog then - prog = ctx.epg:next_programme( + prog = epg:next_programme( v.epg_channel_id, time) exp = prog and prog.start end @@ -266,8 +270,8 @@ local programme_mt = { end, } -function rx.menu_options_channel_epg(ch) - local progs = ctx.epg:channel_programmes(ch) +function rx.menu_options_channel_epg(src_id, ch) + local progs = ctx.src[src_id].epg:channel_programmes(ch) if not progs then return end |
