private static void EnsureGuideChannelForDvbEpg(SchedulerServiceAgent tvSchedulerAgent, GuideServiceAgent tvGuideAgent, Channel channel, TvDatabase.Channel mpChannel)
 {
     if (!channel.GuideChannelId.HasValue)
     {
         string externalId = mpChannel.ExternalId;
         if (String.IsNullOrEmpty(externalId))
         {
             externalId = mpChannel.DisplayName;
         }
         channel.GuideChannelId = tvGuideAgent.EnsureChannel(externalId, mpChannel.DisplayName, channel.ChannelType);
         tvSchedulerAgent.AttachChannelToGuide(channel.ChannelId, channel.GuideChannelId.Value);
     }
 }
 private static void EnsureGuideChannelForDvbEpg(SchedulerServiceAgent tvSchedulerAgent, GuideServiceAgent tvGuideAgent, Channel channel, TvDatabase.Channel mpChannel)
 {
     if (!channel.GuideChannelId.HasValue)
     {
         string externalId = mpChannel.ExternalId;
         if (String.IsNullOrEmpty(externalId))
         {
             externalId = mpChannel.DisplayName;
         }
         channel.GuideChannelId = tvGuideAgent.EnsureChannel(externalId, mpChannel.DisplayName, channel.ChannelType);
         tvSchedulerAgent.AttachChannelToGuide(channel.ChannelId, channel.GuideChannelId.Value);
     }
 }