|
|
@ -151,12 +151,20 @@ namespace MediaBrowser.Server.Implementations.LiveTv.Listings
|
|
|
|
public async Task AddMetadata(ListingsProviderInfo info, List<ChannelInfo> channels,
|
|
|
|
public async Task AddMetadata(ListingsProviderInfo info, List<ChannelInfo> channels,
|
|
|
|
CancellationToken cancellationToken)
|
|
|
|
CancellationToken cancellationToken)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
if (string.IsNullOrWhiteSpace(info.ListingsId))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
throw new Exception("ListingsId required");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var token = await GetToken(info, cancellationToken);
|
|
|
|
var token = await GetToken(info, cancellationToken);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (string.IsNullOrWhiteSpace(token))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
throw new Exception("token required");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
_channelPair.Clear();
|
|
|
|
_channelPair.Clear();
|
|
|
|
|
|
|
|
|
|
|
|
if (!String.IsNullOrWhiteSpace(token) && !String.IsNullOrWhiteSpace(info.ListingsId))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var httpOptions = new HttpRequestOptions()
|
|
|
|
var httpOptions = new HttpRequestOptions()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Url = ApiUrl + "/lineups/" + info.ListingsId,
|
|
|
|
Url = ApiUrl + "/lineups/" + info.ListingsId,
|
|
|
@ -213,7 +221,6 @@ namespace MediaBrowser.Server.Implementations.LiveTv.Listings
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private ProgramInfo GetProgram(string channel, ScheduleDirect.Program programInfo,
|
|
|
|
private ProgramInfo GetProgram(string channel, ScheduleDirect.Program programInfo,
|
|
|
|
ScheduleDirect.ProgramDetails details)
|
|
|
|
ScheduleDirect.ProgramDetails details)
|
|
|
@ -572,6 +579,11 @@ namespace MediaBrowser.Server.Implementations.LiveTv.Listings
|
|
|
|
|
|
|
|
|
|
|
|
var token = await GetToken(info, cancellationToken);
|
|
|
|
var token = await GetToken(info, cancellationToken);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (string.IsNullOrWhiteSpace(token))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
throw new Exception("token required");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
_logger.Info("Headends on account ");
|
|
|
|
_logger.Info("Headends on account ");
|
|
|
|
|
|
|
|
|
|
|
|
var options = new HttpRequestOptions()
|
|
|
|
var options = new HttpRequestOptions()
|
|
|
|