|
|
@ -82,7 +82,8 @@ namespace MediaBrowser.Server.Implementations.LiveTv.Listings
|
|
|
|
UserAgent = UserAgent,
|
|
|
|
UserAgent = UserAgent,
|
|
|
|
CancellationToken = cancellationToken,
|
|
|
|
CancellationToken = cancellationToken,
|
|
|
|
// The data can be large so give it some extra time
|
|
|
|
// The data can be large so give it some extra time
|
|
|
|
TimeoutMs = 60000
|
|
|
|
TimeoutMs = 60000,
|
|
|
|
|
|
|
|
LogErrorResponseBody = true
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
httpOptions.RequestHeaders["token"] = token;
|
|
|
|
httpOptions.RequestHeaders["token"] = token;
|
|
|
@ -123,7 +124,8 @@ namespace MediaBrowser.Server.Implementations.LiveTv.Listings
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Url = ApiUrl + "/programs",
|
|
|
|
Url = ApiUrl + "/programs",
|
|
|
|
UserAgent = UserAgent,
|
|
|
|
UserAgent = UserAgent,
|
|
|
|
CancellationToken = cancellationToken
|
|
|
|
CancellationToken = cancellationToken,
|
|
|
|
|
|
|
|
LogErrorResponseBody = true
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
httpOptions.RequestHeaders["token"] = token;
|
|
|
|
httpOptions.RequestHeaders["token"] = token;
|
|
|
@ -213,7 +215,8 @@ namespace MediaBrowser.Server.Implementations.LiveTv.Listings
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Url = ApiUrl + "/lineups/" + info.ListingsId,
|
|
|
|
Url = ApiUrl + "/lineups/" + info.ListingsId,
|
|
|
|
UserAgent = UserAgent,
|
|
|
|
UserAgent = UserAgent,
|
|
|
|
CancellationToken = cancellationToken
|
|
|
|
CancellationToken = cancellationToken,
|
|
|
|
|
|
|
|
LogErrorResponseBody = true
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
httpOptions.RequestHeaders["token"] = token;
|
|
|
|
httpOptions.RequestHeaders["token"] = token;
|
|
|
@ -451,7 +454,8 @@ namespace MediaBrowser.Server.Implementations.LiveTv.Listings
|
|
|
|
Url = ApiUrl + "/metadata/programs",
|
|
|
|
Url = ApiUrl + "/metadata/programs",
|
|
|
|
UserAgent = UserAgent,
|
|
|
|
UserAgent = UserAgent,
|
|
|
|
CancellationToken = cancellationToken,
|
|
|
|
CancellationToken = cancellationToken,
|
|
|
|
RequestContent = imageIdString
|
|
|
|
RequestContent = imageIdString,
|
|
|
|
|
|
|
|
LogErrorResponseBody = true
|
|
|
|
};
|
|
|
|
};
|
|
|
|
List<ScheduleDirect.ShowImages> images;
|
|
|
|
List<ScheduleDirect.ShowImages> images;
|
|
|
|
using (var innerResponse2 = await _httpClient.Post(httpOptions))
|
|
|
|
using (var innerResponse2 = await _httpClient.Post(httpOptions))
|
|
|
@ -478,7 +482,8 @@ namespace MediaBrowser.Server.Implementations.LiveTv.Listings
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Url = ApiUrl + "/headends?country=" + country + "&postalcode=" + location,
|
|
|
|
Url = ApiUrl + "/headends?country=" + country + "&postalcode=" + location,
|
|
|
|
UserAgent = UserAgent,
|
|
|
|
UserAgent = UserAgent,
|
|
|
|
CancellationToken = cancellationToken
|
|
|
|
CancellationToken = cancellationToken,
|
|
|
|
|
|
|
|
LogErrorResponseBody = true
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
options.RequestHeaders["token"] = token;
|
|
|
|
options.RequestHeaders["token"] = token;
|
|
|
@ -595,7 +600,8 @@ namespace MediaBrowser.Server.Implementations.LiveTv.Listings
|
|
|
|
Url = ApiUrl + "/token",
|
|
|
|
Url = ApiUrl + "/token",
|
|
|
|
UserAgent = UserAgent,
|
|
|
|
UserAgent = UserAgent,
|
|
|
|
RequestContent = "{\"username\":\"" + username + "\",\"password\":\"" + password + "\"}",
|
|
|
|
RequestContent = "{\"username\":\"" + username + "\",\"password\":\"" + password + "\"}",
|
|
|
|
CancellationToken = cancellationToken
|
|
|
|
CancellationToken = cancellationToken,
|
|
|
|
|
|
|
|
LogErrorResponseBody = true
|
|
|
|
};
|
|
|
|
};
|
|
|
|
//_logger.Info("Obtaining token from Schedules Direct from addres: " + httpOptions.Url + " with body " +
|
|
|
|
//_logger.Info("Obtaining token from Schedules Direct from addres: " + httpOptions.Url + " with body " +
|
|
|
|
// httpOptions.RequestContent);
|
|
|
|
// httpOptions.RequestContent);
|
|
|
@ -633,7 +639,8 @@ namespace MediaBrowser.Server.Implementations.LiveTv.Listings
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Url = ApiUrl + "/lineups/" + info.ListingsId,
|
|
|
|
Url = ApiUrl + "/lineups/" + info.ListingsId,
|
|
|
|
UserAgent = UserAgent,
|
|
|
|
UserAgent = UserAgent,
|
|
|
|
CancellationToken = cancellationToken
|
|
|
|
CancellationToken = cancellationToken,
|
|
|
|
|
|
|
|
LogErrorResponseBody = true
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
httpOptions.RequestHeaders["token"] = token;
|
|
|
|
httpOptions.RequestHeaders["token"] = token;
|
|
|
@ -673,7 +680,8 @@ namespace MediaBrowser.Server.Implementations.LiveTv.Listings
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Url = ApiUrl + "/lineups",
|
|
|
|
Url = ApiUrl + "/lineups",
|
|
|
|
UserAgent = UserAgent,
|
|
|
|
UserAgent = UserAgent,
|
|
|
|
CancellationToken = cancellationToken
|
|
|
|
CancellationToken = cancellationToken,
|
|
|
|
|
|
|
|
LogErrorResponseBody = true
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
options.RequestHeaders["token"] = token;
|
|
|
|
options.RequestHeaders["token"] = token;
|
|
|
|