From ac592aa78f280d0a31aad21ffb597824b17024a4 Mon Sep 17 00:00:00 2001 From: 1hitsong <3330318+1hitsong@users.noreply.github.com> Date: Fri, 27 Oct 2023 16:39:35 -0400 Subject: [PATCH] Add support quickplay program --- source/Main.brs | 2 ++ source/utils/quickplay.bs | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/source/Main.brs b/source/Main.brs index 43787084..358934f7 100644 --- a/source/Main.brs +++ b/source/Main.brs @@ -189,6 +189,8 @@ sub Main (args as dynamic) as void quickplay.person(itemNode) else if itemType = "tvchannel" quickplay.tvChannel(itemNode) + else if itemType = "program" + quickplay.program(itemNode) end if m.global.queueManager.callFunc("playQueue") diff --git a/source/utils/quickplay.bs b/source/utils/quickplay.bs index 910329f7..90d15528 100644 --- a/source/utils/quickplay.bs +++ b/source/utils/quickplay.bs @@ -324,6 +324,15 @@ namespace quickplay m.global.sceneManager.callFunc("pushScene", group) end sub + ' Quick Play A Live Program + sub program(itemNode as object) + if not isValid(itemNode) or not isValid(itemNode.json) or not isValid(itemNode.json.ChannelId) then return + + stopLoadingSpinner() + group = CreateVideoPlayerGroup(itemNode.json.ChannelId) + m.global.sceneManager.callFunc("pushScene", group) + end sub + ' Quick Play A Playlist. ' Play the first unwatched episode. ' If none, play the whole season starting with episode 1.