private static void PersistPortalChannel(PortalChannel pChannel) { TvBusinessLayer layer = new TvBusinessLayer(); Channel dbPortalChannel = layer.GetChannelByTuningDetail(pChannel.NetworkId, pChannel.TransportId, pChannel.ServiceId); if (dbPortalChannel == null) { Log.Info("Portal channel with networkId={0}, transportId={1}, serviceId={2} not found", pChannel.NetworkId, pChannel.TransportId, pChannel.ServiceId); return; } Gentle.Framework.Broker.Execute("delete from ChannelLinkageMap WHERE idPortalChannel=" + dbPortalChannel.IdChannel); foreach (LinkedChannel lChannel in pChannel.LinkedChannels) { Channel dbLinkedChannnel = layer.GetChannelByTuningDetail(lChannel.NetworkId, lChannel.TransportId, lChannel.ServiceId); if (dbLinkedChannnel == null) { Log.Info("Linked channel with name={0}, networkId={1}, transportId={2}, serviceId={3} not found", lChannel.Name, lChannel.NetworkId, lChannel.TransportId, lChannel.ServiceId); continue; } dbLinkedChannnel.DisplayName = lChannel.Name; dbLinkedChannnel.Persist(); ChannelLinkageMap map = new ChannelLinkageMap(dbPortalChannel.IdChannel, dbLinkedChannnel.IdChannel, lChannel.Name); map.Persist(); } }
/// <summary> /// checks if a received EPGChannel should be filtered from the resultlist /// </summary> /// <value></value> protected override bool FilterOutEPGChannel(EpgChannel epgChannel) { TvBusinessLayer layer = new TvBusinessLayer(); if (layer.GetSetting("generalGrapOnlyForSameTransponder", "no").Value == "yes") { DVBBaseChannel chan = epgChannel.Channel as DVBBaseChannel; Channel dbchannel = layer.GetChannelByTuningDetail(chan.NetworkId, chan.TransportId, chan.ServiceId); DVBTChannel dvbtchannel = new DVBTChannel(); if (dbchannel == null) { return(false); } foreach (TuningDetail detail in dbchannel.ReferringTuningDetail()) { if (detail.ChannelType == 4) { dvbtchannel.Frequency = detail.Frequency; dvbtchannel.BandWidth = detail.Bandwidth; } } return(this.CurrentChannel.IsDifferentTransponder(dvbtchannel)); } else { return(false); } }
/// <summary> /// checks if a received EPGChannel should be filtered from the resultlist /// </summary> /// <value></value> protected override bool FilterOutEPGChannel(EpgChannel epgChannel) { TvBusinessLayer layer = new TvBusinessLayer(); if (layer.GetSetting("generalGrapOnlyForSameTransponder", "no").Value == "yes") { DVBBaseChannel chan = epgChannel.Channel as DVBBaseChannel; Channel dbchannel = layer.GetChannelByTuningDetail(chan.NetworkId, chan.TransportId, chan.ServiceId); ATSCChannel atscchannel = new ATSCChannel(); if (dbchannel == null) { return(false); } foreach (TuningDetail detail in dbchannel.ReferringTuningDetail()) { if (detail.ChannelType == 1) { atscchannel.MajorChannel = detail.MajorChannel; atscchannel.MinorChannel = detail.MinorChannel; atscchannel.PhysicalChannel = detail.ChannelNumber; } } return(this.CurrentChannel.IsDifferentTransponder(atscchannel)); } else { return(false); } }
/// <summary> /// checks if a received EPGChannel should be filtered from the resultlist /// </summary> /// <value></value> protected override bool FilterOutEPGChannel(EpgChannel epgChannel) { TvBusinessLayer layer = new TvBusinessLayer(); if (layer.GetSetting("generalGrapOnlyForSameTransponder", "no").Value == "yes") { DVBBaseChannel chan = epgChannel.Channel as DVBBaseChannel; Channel dbchannel = layer.GetChannelByTuningDetail(chan.NetworkId, chan.TransportId, chan.ServiceId); DVBSChannel dvbschannel = new DVBSChannel(); if (dbchannel == null) { return(false); } foreach (TuningDetail detail in dbchannel.ReferringTuningDetail()) { if (detail.ChannelType == 3) { dvbschannel.Frequency = detail.Frequency; dvbschannel.Polarisation = (Polarisation)detail.Polarisation; dvbschannel.ModulationType = (ModulationType)detail.Modulation; dvbschannel.SatelliteIndex = detail.SatIndex; dvbschannel.InnerFecRate = (BinaryConvolutionCodeRate)detail.InnerFecRate; dvbschannel.Pilot = (Pilot)detail.Pilot; dvbschannel.Rolloff = (RollOff)detail.RollOff; dvbschannel.DisEqc = (DisEqcType)detail.Diseqc; } } return(this.CurrentChannel.IsDifferentTransponder(dvbschannel)); } else { return(false); } }