Hi,
I'm trying to use roProgramGuide to build a grid of current and upcoming shows for the channels I receive via the OTA tuner in a Screen Graph channel. I'm able to build a list of channels I receive, but can only get program data back for channels I've physically browsed to in the Antenna TV channel on my Sharp TV (software 7.1.0) since the last restart.
Here's an example of what I mean:
If I restart my TV and run my dev channel, I get no program data back from my list of tuner channels. But, if I restart my TV and browse to the Antenna TV channel and view channel 2.1, I can run my dev channel and get the current and upcoming programs for channels 2.1, 2.2 and 2.3. The rest are empty. If I leave my TV on and go to 8.1 back in Antenna TV and then go back to my dev channel I can now pull in program data for 2.1, 2.2, 2.3, 8.1, 8.2, and 8.3. If I restart my TV that all goes away and I'm back to an empty program guide.
Should I be able to pull in program data for all my tuner channels, or does roProgramGuide only work for channels that have been tuned to since the last restart in Antenna TV?
Here is my sample code:
tuner = CreateObject("roTuner")
channels = tuner.GetChannelList()
guide = tuner.GetGuide()
'create now time
now = CreateObject("roDateTime")
'create some future time
future = CreateObject("roDateTime")
future.FromSeconds(1465243200)
'loop over channel list and get program data
for each channel in channels
programs = guide.GetPrograms(now, channel, future)
if programs.Count() = 0 then
'do nothing
else
print "Channel: "; channel
for each program in programs
print program.name
end for
print " "
end if
end for
What am I doing wrong?
Also, I get the following error if I try to use GetNowNextPrograms:
Member function not found in BrightScript Component or interface. Is that a known issue?
Thanks!