diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2017-02-08 16:29:08 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2017-02-08 16:29:08 -0500 |
| commit | 1e28de1098d65f48e9a766fdc4963f04d6611bda (patch) | |
| tree | e88faff507284f0a754189c7af50575964a6c318 /Emby.Server.Implementations | |
| parent | 2fa03c19d48fca865f108895f28b7fb436b9edf4 (diff) | |
update channel mapping
Diffstat (limited to 'Emby.Server.Implementations')
| -rw-r--r-- | Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs index fe114d224..cd5fd0c8c 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.EmbyTV public 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) { |
