Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
function GetChannels() {
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, Global.GetAllLineups()[0]);
Channel["Viewable"] = DiscoveredChannel.isViewable();
Channel["Description"] = ChannelAPI.GetChannelDescription(DiscoveredChannel);
Channels.push(Channel);
}
return Channels;
}
function RestoreChannels(CallSign, Description, Network, StationID, LogicalNumber, PhysicalNumber) {
ChannelObject = ChannelAPI.AddChannel(CallSign, Description, Network, StationID);
ChannelAPI.SetChannelMappingForLineup(ChannelObject, Global.GetAllLineups()[0], LogicalNumber);
ChannelAPI.SetPhysicalChannelMappingForLineup(ChannelObject, Global.GetAllLineups()[0], PhysicalNumber);
return LogicalChannelResponse;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.