diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-09-10 14:28:22 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-09-10 14:28:22 -0400 |
| commit | baf2f801549a284501ee836053aa113adf5b1503 (patch) | |
| tree | 4ae5c00cbef70a5c05866b0d2ea0ad2b7f13bf10 /MediaBrowser.Server.Implementations/LiveTv | |
| parent | ce0435a66d98be8519a0c6e438674caf3badc076 (diff) | |
update camera upload
Diffstat (limited to 'MediaBrowser.Server.Implementations/LiveTv')
| -rw-r--r-- | MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs | 14 | ||||
| -rw-r--r-- | MediaBrowser.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.cs | 2 |
2 files changed, 15 insertions, 1 deletions
diff --git a/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs b/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs index c5edb212b..fb5824805 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs +++ b/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs @@ -370,6 +370,19 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV public async Task<IEnumerable<ProgramInfo>> GetProgramsAsync(string channelId, DateTime startDateUtc, DateTime endDateUtc, CancellationToken cancellationToken) { + try + { + return await GetProgramsAsyncInternal(channelId, startDateUtc, endDateUtc, cancellationToken).ConfigureAwait(false); + } + catch (Exception ex) + { + _logger.ErrorException("Error getting programs", ex); + return GetEpgDataForChannel(channelId).Where(i => i.StartDate <= endDateUtc && i.EndDate >= startDateUtc); + } + } + + private async Task<IEnumerable<ProgramInfo>> GetProgramsAsyncInternal(string channelId, DateTime startDateUtc, DateTime endDateUtc, CancellationToken cancellationToken) + { var channels = await GetChannelsAsync(true, cancellationToken).ConfigureAwait(false); var channel = channels.First(i => string.Equals(i.Id, channelId, StringComparison.OrdinalIgnoreCase)); @@ -377,6 +390,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV { var programs = await provider.Item1.GetProgramsAsync(provider.Item2, channel.Number, startDateUtc, endDateUtc, cancellationToken) .ConfigureAwait(false); + var list = programs.ToList(); // Replace the value that came from the provider with a normalized value diff --git a/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.cs b/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.cs index bc6ed47ad..c16d044b7 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.cs +++ b/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.cs @@ -331,7 +331,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.TunerHosts.HdHomerun Container = "ts", Id = profile, SupportsDirectPlay = true, - SupportsDirectStream = false, + SupportsDirectStream = true, SupportsTranscoding = true }; |
