diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-07-23 13:04:54 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-07-23 13:04:54 -0400 |
| commit | f5c83f557854c25755e4d083ac89893a6a92dd58 (patch) | |
| tree | 95c5a3d5f6330c920f18c918af60d1f184d56ede /MediaBrowser.Server.Implementations/LiveTv/Listings | |
| parent | ffd9460d51980a550ef5460e5df4e942b63077a7 (diff) | |
update ScheduleDirect help text
Diffstat (limited to 'MediaBrowser.Server.Implementations/LiveTv/Listings')
| -rw-r--r-- | MediaBrowser.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/MediaBrowser.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs b/MediaBrowser.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs index 668f023d2b..269da57683 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs +++ b/MediaBrowser.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs @@ -523,6 +523,31 @@ namespace MediaBrowser.Server.Implementations.LiveTv.Listings } } + private async Task AddLineupToAccount(ListingsProviderInfo info, CancellationToken cancellationToken) + { + var token = await GetToken(info, cancellationToken); + + if (string.IsNullOrWhiteSpace(token)) + { + throw new ArgumentException("Authentication required."); + } + + _logger.Info("Adding new LineUp "); + + var httpOptions = new HttpRequestOptions() + { + Url = ApiUrl + "/lineups/" + info.ListingsId, + UserAgent = UserAgent, + CancellationToken = cancellationToken + }; + + httpOptions.RequestHeaders["token"] = token; + + using (var response = await _httpClient.SendAsync(httpOptions, "PUT")) + { + } + } + public string Name { get { return "Schedules Direct"; } @@ -814,6 +839,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.Listings public async Task Validate(ListingsProviderInfo info) { + await AddLineupToAccount(info, CancellationToken.None).ConfigureAwait(false); } public Task<List<NameIdPair>> GetLineups(ListingsProviderInfo info, string location) |
