mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 19:37:55 +02:00
commit
1ec5e13cdc
3 changed files with 12 additions and 8 deletions
|
@ -469,16 +469,20 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
|
||||||
|
|
||||||
public ChannelInfo GetEpgChannelFromTunerChannel(List<NameValuePair> mappings, ChannelInfo tunerChannel, List<ChannelInfo> epgChannels)
|
public ChannelInfo GetEpgChannelFromTunerChannel(List<NameValuePair> mappings, ChannelInfo tunerChannel, List<ChannelInfo> epgChannels)
|
||||||
{
|
{
|
||||||
if (!string.IsNullOrWhiteSpace(tunerChannel.TunerChannelId))
|
var tunerChannelId = string.IsNullOrWhiteSpace(tunerChannel.TunerChannelId)
|
||||||
{
|
? tunerChannel.Id
|
||||||
var tunerChannelId = GetMappedChannel(tunerChannel.TunerChannelId, mappings);
|
: tunerChannel.TunerChannelId;
|
||||||
|
|
||||||
if (string.IsNullOrWhiteSpace(tunerChannelId))
|
if (!string.IsNullOrWhiteSpace(tunerChannelId))
|
||||||
|
{
|
||||||
|
var mappedTunerChannelId = GetMappedChannel(tunerChannelId, mappings);
|
||||||
|
|
||||||
|
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)
|
if (channel != null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -791,7 +791,7 @@ namespace MediaBrowser.Api.LiveTv
|
||||||
ProviderChannels = providerChannels.Select(i => new NameIdPair
|
ProviderChannels = providerChannels.Select(i => new NameIdPair
|
||||||
{
|
{
|
||||||
Name = i.Name,
|
Name = i.Name,
|
||||||
Id = i.TunerChannelId
|
Id = string.IsNullOrWhiteSpace(i.TunerChannelId) ? i.Id : i.TunerChannelId
|
||||||
|
|
||||||
}).ToList(),
|
}).ToList(),
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
|
||||||
[assembly: AssemblyVersion("3.2.0.102")]
|
[assembly: AssemblyVersion("3.2.0.103")]
|
||||||
|
|
Loading…
Reference in a new issue