The Free Software Media System - Server Backend & API
update channel mapping
Luke Pulverenti1e28de1098d6
diff --git a/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.csindex fe114d224e..cd5fd0c8c9 100644--- a/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs+++ b/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs@@ -469,16 +469,20 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTVpublic ChannelInfo GetEpgChannelFromTunerChannel(List<NameValuePair> mappings, ChannelInfo tunerChannel, List<ChannelInfo> epgChannels){- if (!string.IsNullOrWhiteSpace(tunerChannel.TunerChannelId))+ var tunerChannelId = string.IsNullOrWhiteSpace(tunerChannel.TunerChannelId)+ ? tunerChannel.Id+ : tunerChannel.TunerChannelId;++ if (!string.IsNullOrWhiteSpace(tunerChannelId)){- var tunerChannelId = GetMappedChannel(tunerChannel.TunerChannelId, mappings);+ var mappedTunerChannelId = GetMappedChannel(tunerChannelId, mappings);- if (string.IsNullOrWhiteSpace(tunerChannelId))+ if (string.IsNullOrWhiteSpace(mappedTunerChannelId)){- tunerChannelId = tunerChannel.TunerChannelId;+ mappedTunerChannelId = tunerChannelId;}- var channel = epgChannels.FirstOrDefault(i => string.Equals(tunerChannelId, i.Id, StringComparison.OrdinalIgnoreCase));+ var channel = epgChannels.FirstOrDefault(i => string.Equals(mappedTunerChannelId, i.Id, StringComparison.OrdinalIgnoreCase));if (channel != null){diff --git a/MediaBrowser.Api/LiveTv/LiveTvService.cs b/MediaBrowser.Api/LiveTv/LiveTvService.csindex 04983553b4..909fc0623d 100644--- a/MediaBrowser.Api/LiveTv/LiveTvService.cs+++ b/MediaBrowser.Api/LiveTv/LiveTvService.cs@@ -791,7 +791,7 @@ namespace MediaBrowser.Api.LiveTvProviderChannels = providerChannels.Select(i => new NameIdPair{Name = i.Name,- Id = i.TunerChannelId+ Id = string.IsNullOrWhiteSpace(i.TunerChannelId) ? i.Id : i.TunerChannelId}).ToList(),