handle null channel number
This commit is contained in:
parent
fcdd8cf899
commit
bdf4cc0afa
|
@ -847,12 +847,16 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
|
|||
|
||||
var channelMappings = GetChannelMappings(provider.Item2);
|
||||
var channelNumber = channel.Number;
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(channelNumber))
|
||||
{
|
||||
string mappedChannelNumber;
|
||||
if (channelMappings.TryGetValue(channelNumber, out mappedChannelNumber))
|
||||
{
|
||||
_logger.Debug("Found mapped channel on provider {0}. Tuner channel number: {1}, Mapped channel number: {2}", provider.Item1.Name, channelNumber, mappedChannelNumber);
|
||||
channelNumber = mappedChannelNumber;
|
||||
}
|
||||
}
|
||||
|
||||
var programs = await provider.Item1.GetProgramsAsync(provider.Item2, channelNumber, channel.Name, startDateUtc, endDateUtc, cancellationToken)
|
||||
.ConfigureAwait(false);
|
||||
|
|
Loading…
Reference in New Issue
Block a user