aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs')
-rw-r--r--MediaBrowser.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs14
1 files changed, 9 insertions, 5 deletions
diff --git a/MediaBrowser.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs b/MediaBrowser.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs
index 269da5768..ed265d416 100644
--- a/MediaBrowser.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs
+++ b/MediaBrowser.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs
@@ -387,7 +387,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.Listings
return images;
}
- public async Task<List<NameIdPair>> GetHeadends(ListingsProviderInfo info, string location, CancellationToken cancellationToken)
+ public async Task<List<NameIdPair>> GetHeadends(ListingsProviderInfo info, string country, string location, CancellationToken cancellationToken)
{
var token = await GetToken(info, cancellationToken);
@@ -400,9 +400,13 @@ namespace MediaBrowser.Server.Implementations.LiveTv.Listings
_logger.Info("Headends on account ");
+ var countryParam = string.Equals("ca", country, StringComparison.OrdinalIgnoreCase)
+ ? "Canada"
+ : "USA";
+
var options = new HttpRequestOptions()
{
- Url = ApiUrl + "/headends?country=USA&postalcode=" + location,
+ Url = ApiUrl + "/headends?country=" + countryParam + "&postalcode=" + location,
UserAgent = UserAgent,
CancellationToken = cancellationToken
};
@@ -839,12 +843,12 @@ namespace MediaBrowser.Server.Implementations.LiveTv.Listings
public async Task Validate(ListingsProviderInfo info)
{
- await AddLineupToAccount(info, CancellationToken.None).ConfigureAwait(false);
+ //await AddLineupToAccount(info, CancellationToken.None).ConfigureAwait(false);
}
- public Task<List<NameIdPair>> GetLineups(ListingsProviderInfo info, string location)
+ public Task<List<NameIdPair>> GetLineups(ListingsProviderInfo info, string country, string location)
{
- return GetHeadends(info, location, CancellationToken.None);
+ return GetHeadends(info, country, location, CancellationToken.None);
}
}
}