update xmltv parsing
This commit is contained in:
@@ -847,6 +847,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
|
||||
|
||||
var channelMappings = GetChannelMappings(provider.Item2);
|
||||
var channelNumber = channel.Number;
|
||||
var tunerChannelId = channel.TunerChannelId;
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(channelNumber))
|
||||
{
|
||||
@@ -858,7 +859,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
|
||||
}
|
||||
}
|
||||
|
||||
var programs = await provider.Item1.GetProgramsAsync(provider.Item2, channelNumber, channel.Name, startDateUtc, endDateUtc, cancellationToken)
|
||||
var programs = await provider.Item1.GetProgramsAsync(provider.Item2, tunerChannelId, channelNumber, channel.Name, startDateUtc, endDateUtc, cancellationToken)
|
||||
.ConfigureAwait(false);
|
||||
|
||||
var list = programs.ToList();
|
||||
|
||||
@@ -60,7 +60,7 @@ namespace Emby.Server.Implementations.LiveTv.Listings
|
||||
return dates;
|
||||
}
|
||||
|
||||
public async Task<IEnumerable<ProgramInfo>> GetProgramsAsync(ListingsProviderInfo info, string channelNumber, string channelName, DateTime startDateUtc, DateTime endDateUtc, CancellationToken cancellationToken)
|
||||
public async Task<IEnumerable<ProgramInfo>> GetProgramsAsync(ListingsProviderInfo info, string channelId, string channelNumber, string channelName, DateTime startDateUtc, DateTime endDateUtc, CancellationToken cancellationToken)
|
||||
{
|
||||
List<ProgramInfo> programsInfo = new List<ProgramInfo>();
|
||||
|
||||
|
||||
@@ -106,7 +106,7 @@ namespace Emby.Server.Implementations.LiveTv.Listings
|
||||
return cacheFile;
|
||||
}
|
||||
|
||||
public async Task<IEnumerable<ProgramInfo>> GetProgramsAsync(ListingsProviderInfo info, string channelNumber, string channelName, DateTime startDateUtc, DateTime endDateUtc, CancellationToken cancellationToken)
|
||||
public async Task<IEnumerable<ProgramInfo>> GetProgramsAsync(ListingsProviderInfo info, string channelId, string channelNumber, string channelName, DateTime startDateUtc, DateTime endDateUtc, CancellationToken cancellationToken)
|
||||
{
|
||||
if (!await EmbyTV.EmbyTVRegistration.Instance.EnableXmlTv().ConfigureAwait(false))
|
||||
{
|
||||
@@ -161,8 +161,12 @@ namespace Emby.Server.Implementations.LiveTv.Listings
|
||||
}
|
||||
else
|
||||
{
|
||||
var uniqueString = (p.Title ?? string.Empty) + (episodeTitle ?? string.Empty);
|
||||
var uniqueString = (p.Title ?? string.Empty) + (episodeTitle ?? string.Empty) + (p.IceTvEpisodeNumber ?? string.Empty);
|
||||
|
||||
if (programInfo.SeasonNumber.HasValue)
|
||||
{
|
||||
uniqueString = "-" + programInfo.SeasonNumber.Value.ToString(CultureInfo.InvariantCulture);
|
||||
}
|
||||
if (programInfo.EpisodeNumber.HasValue)
|
||||
{
|
||||
uniqueString = "-" + programInfo.EpisodeNumber.Value.ToString(CultureInfo.InvariantCulture);
|
||||
|
||||
@@ -137,6 +137,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts
|
||||
if (attributes.TryGetValue("tvg-id", out value))
|
||||
{
|
||||
channel.Id = value;
|
||||
channel.TunerChannelId = value;
|
||||
}
|
||||
|
||||
return channel;
|
||||
|
||||
Reference in New Issue
Block a user