So, I have an issue with populating the content of the TimeGrid, no matter what I do I'm greeted with `No Data Available` message for programs when the TimeGrid component is displayed. I've gone through TimeGrid documentation multiple times, and checked data I'm passing to TimeGrid multiple times as well, and in the end, only the channels are detected, but not their programs.
I'm trying to configure a simple EPG grid with 5 channels, each with two programs (for now). I've configured content node as per docs, with one root content node, with children content nodes as channels, with each channel having programs as children content nodes, sorted by start time. Start times and end times of the programs are aligned correctly, and contentStartTime and leftEdgeTargetTime are set to one hour before the actual program start, to account for programs already in progress.
Am I missing something? Is there any implementation gotchas that I should be aware of?
Also, is there any other example other than SGDEX TimeGridView? It's overly complex, and we're not using SGDEX in our app.
So, I've figured it out with the folks at RokuDev Slack. I've been manually setting PLAYDURATION,
PLAYSTART, and TITLE to a content nodes used for programs, and that rendering of the program nodes was silently failing because of that... When I've removed those fields, programs were displayed without issues.
So, I've figured it out with the folks at RokuDev Slack. I've been manually setting PLAYDURATION,
PLAYSTART, and TITLE to a content nodes used for programs, and that rendering of the program nodes was silently failing because of that... When I've removed those fields, programs were displayed without issues.
@Tasevski Please enlight me with how to set the program details if we are not allowed to set manually these - PLAYDURATION, PLAYSTART, and TITLE to content nodes. I'm having the same problem as you. The UI is showing just "no content available"
@eastWind You set those fields to the ContentNode without defining them in the XML interface beforehand. For example, this is simplified version of my EPGProgram node's XML file:
<?xml version="1.0" encoding="UTF-8"?> <component name="EPGProgramModel" extends="ContentNode" > <interface>> <field id="program" type="AssocArray" onChange="onProgramSet" /> </interface> <script type="text/brightscript" uri="pkg:/components/Models/EPGModels/EPGProgramModel.brs" /> </component>
and its brightscript file:
sub init() end sub sub onProgramSet(event as object) program = event.getData() if program <> invalid m.top.id = program.id ' ... ' ... some code omitted for brevity ' ... m.top.Description = program.description m.top.PlayDuration = playDuration m.top.PlayStart = playStart m.top.Rating = program.rating m.top.Title = program.title end if end sub
@Tasevski That did work. Thanks