Skip to content

Instantly share code, notes, and snippets.

@yoavp77
Created November 27, 2018 00:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yoavp77/e0c894e4d5313c9490cbb7251f9d72a4 to your computer and use it in GitHub Desktop.
Save yoavp77/e0c894e4d5313c9490cbb7251f9d72a4 to your computer and use it in GitHub Desktop.
function GetChannels(Lineup) {
var Channel = [];
var Channels = [];
for (i = 0; i < ChannelAPI.GetAllChannels().length; i++) {
DiscoveredChannel = ChannelAPI.GetAllChannels()[i];
var Channel = [];
Channel["StationID"] = DiscoveredChannel.getStationID();
Channel["Number"] = DiscoveredChannel.getNumber();
Channel["Name"] = DiscoveredChannel.getFullName();
Channel["Physical"] = ChannelAPI.GetPhysicalChannelNumberForLineup(DiscoveredChannel, Lineup);
Channel["Viewable"] = DiscoveredChannel.isViewable();
Channels.push(Channel);
}
return Channels;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment