From ea245d2abc1361f54485a3645e421376e2b798f6 Mon Sep 17 00:00:00 2001 From: Neil Burrows Date: Sun, 31 May 2020 14:46:33 +0100 Subject: [PATCH] Initial LiveTV Support Most of the work from Alex Gonzales (@Musi13) --- components/data/ChannelData.brs | 15 +++++++ components/data/ChannelData.xml | 11 +++++ components/home/LoadItemsTask.xml | 1 + components/livetv/Channels.brs | 14 +++++++ components/livetv/Channels.xml | 14 +++++++ source/Main.brs | 29 ++++++++++++- source/ShowScenes.brs | 63 +++++++++++++++++++++++++++++ source/VideoPlayer.brs | 37 +++++++++++++++-- source/api/Items.brs | 63 +++++++++++++++++++++++++---- source/utils/TranscodeSubtitles.brs | 2 +- 10 files changed, 236 insertions(+), 13 deletions(-) create mode 100644 components/data/ChannelData.brs create mode 100644 components/data/ChannelData.xml create mode 100644 components/livetv/Channels.brs create mode 100644 components/livetv/Channels.xml diff --git a/components/data/ChannelData.brs b/components/data/ChannelData.brs new file mode 100644 index 00000000..c8690780 --- /dev/null +++ b/components/data/ChannelData.brs @@ -0,0 +1,15 @@ +sub setFields() + json = m.top.json + + m.top.id = json.id + m.top.title = json.name + m.top.live = true +end sub + +sub setPoster() + if m.top.image <> invalid + m.top.posterURL = m.top.image.url + else + m.top.posterURL = "" + end if +end sub diff --git a/components/data/ChannelData.xml b/components/data/ChannelData.xml new file mode 100644 index 00000000..4f291be3 --- /dev/null +++ b/components/data/ChannelData.xml @@ -0,0 +1,11 @@ + + + + + + + + + +