Skip to content

Commit

Permalink
Add support quickplay program
Browse files Browse the repository at this point in the history
  • Loading branch information
1hitsong authored and cewert committed Oct 28, 2023
1 parent 7f4462c commit ac592aa
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions source/Main.brs
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
9 changes: 9 additions & 0 deletions source/utils/quickplay.bs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit ac592aa

Please sign in to comment.