diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-08-21 01:00:56 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-08-21 01:00:56 -0400 |
| commit | 918aa4cfd754d055c80f3aff0bab945be28ee55d (patch) | |
| tree | 3a842d9d919f2cf32b2f14fac3a90bb7c676395a | |
| parent | 920b57d9d167de29191b1005c0c045bbb8e9d1b4 (diff) | |
add slideshows to now playing page
| -rw-r--r-- | MediaBrowser.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs | 23 | ||||
| -rw-r--r-- | MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj | 3 |
2 files changed, 22 insertions, 4 deletions
diff --git a/MediaBrowser.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs b/MediaBrowser.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs index 66053041c..1958cdb03 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs +++ b/MediaBrowser.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs @@ -1,9 +1,11 @@ -using MediaBrowser.Common; +using System.Net; +using MediaBrowser.Common; using MediaBrowser.Common.Net; using MediaBrowser.Controller.LiveTv; using MediaBrowser.Model.Dto; using MediaBrowser.Model.LiveTv; using MediaBrowser.Model.Logging; +using MediaBrowser.Model.Net; using MediaBrowser.Model.Serialization; using System; using System.Collections.Concurrent; @@ -620,11 +622,24 @@ namespace MediaBrowser.Server.Implementations.LiveTv.Listings options.RequestHeaders["token"] = token; - using (var response = await _httpClient.Get(options).ConfigureAwait(false)) + try + { + using (var response = await _httpClient.Get(options).ConfigureAwait(false)) + { + var root = _jsonSerializer.DeserializeFromStream<ScheduleDirect.Lineups>(response); + + return root.lineups.Any(i => string.Equals(info.ListingsId, i.lineup, StringComparison.OrdinalIgnoreCase)); + } + } + catch (HttpException ex) { - var root = _jsonSerializer.DeserializeFromStream<ScheduleDirect.Lineups>(response); + // Apparently we're supposed to swallow this + if (ex.StatusCode.HasValue && ex.StatusCode.Value == HttpStatusCode.BadRequest) + { + return false; + } - return root.lineups.Any(i => string.Equals(info.ListingsId, i.lineup, StringComparison.OrdinalIgnoreCase)); + throw; } } diff --git a/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj b/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj index 5ee76bbd1..e256cdb7c 100644 --- a/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj +++ b/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj @@ -261,6 +261,9 @@ <Content Include="dashboard-ui\scripts\sharingwidget.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
+ <Content Include="dashboard-ui\scripts\slideshow.js">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
<Content Include="dashboard-ui\scripts\wizardlivetvtuner.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
|
