improve m3u parsing

This commit is contained in:
Luke Pulverenti 2017-03-25 18:08:43 -04:00
parent 0cffe00aae
commit b2f7352094
2 changed files with 11 additions and 0 deletions

View File

@ -442,6 +442,11 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
{
result = await provider.GetChannels(info, cancellationToken).ConfigureAwait(false);
foreach (var channel in result)
{
_logger.Info("Found epg channel in {0} {1} {2} {3}", provider.Name, info.ListingsId, channel.Name, channel.Id);
}
_epgChannels.AddOrUpdate(info.Id, result, (k, v) => result);
}
@ -1018,6 +1023,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
if (epgChannel == null)
{
_logger.Debug("EPG channel not found for tuner channel {0}-{1} from {2}-{3}", channel.Number, channel.Name, provider.Item1.Name, provider.Item2.ListingsId ?? string.Empty);
programs = new List<ProgramInfo>();
}
else

View File

@ -144,6 +144,11 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts
channel.TunerChannelId = string.IsNullOrWhiteSpace(tvgId) ? channelId : tvgId;
if (!string.IsNullOrWhiteSpace(channel.TunerChannelId) && channel.TunerChannelId.IndexOf(".json.schedulesdirect.org", StringComparison.OrdinalIgnoreCase) != -1)
{
channel.TunerChannelId = channel.TunerChannelId.Replace(".json.schedulesdirect.org", string.Empty, StringComparison.OrdinalIgnoreCase).TrimStart('I');
}
var channelIdValues = new List<string>();
if (!string.IsNullOrWhiteSpace(channelId))
{