aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2016-02-27 17:55:13 -0500
committerLuke <luke.pulverenti@gmail.com>2016-02-27 17:55:13 -0500
commit86eab01740e7edf760c2d5f3d41b8794aca20db1 (patch)
tree7ce6de4b74b62918462c28c5b75895c19a1824d4 /MediaBrowser.Server.Implementations
parent479db89a310e303330a41d8551bf307ee06f9e62 (diff)
parenta497a8b3eb2668832b8fb47733696028747d4e68 (diff)
Merge pull request #1503 from MediaBrowser/dev
Dev
Diffstat (limited to 'MediaBrowser.Server.Implementations')
-rw-r--r--MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs17
1 files changed, 12 insertions, 5 deletions
diff --git a/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs b/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs
index cd21dc21a..442ab76f6 100644
--- a/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs
+++ b/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs
@@ -350,7 +350,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv
foreach (var source in list)
{
- Normalize(source, item.ChannelType == ChannelType.TV);
+ Normalize(source, service, item.ChannelType == ChannelType.TV);
}
return list;
@@ -379,12 +379,13 @@ namespace MediaBrowser.Server.Implementations.LiveTv
{
MediaSourceInfo info;
bool isVideo;
+ ILiveTvService service;
if (isChannel)
{
var channel = GetInternalChannel(id);
isVideo = channel.ChannelType == ChannelType.TV;
- var service = GetService(channel);
+ service = GetService(channel);
_logger.Info("Opening channel stream from {0}, external channel Id: {1}", service.Name, channel.ExternalId);
info = await service.GetChannelStream(channel.ExternalId, mediaSourceId, cancellationToken).ConfigureAwait(false);
info.RequiresClosing = true;
@@ -400,7 +401,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv
{
var recording = await GetInternalRecording(id, cancellationToken).ConfigureAwait(false);
isVideo = !string.Equals(recording.MediaType, MediaType.Audio, StringComparison.OrdinalIgnoreCase);
- var service = GetService(recording);
+ service = GetService(recording);
_logger.Info("Opening recording stream from {0}, external recording Id: {1}", service.Name, recording.ExternalId);
info = await service.GetRecordingStream(recording.ExternalId, null, cancellationToken).ConfigureAwait(false);
@@ -415,7 +416,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv
}
_logger.Info("Live stream info: {0}", _jsonSerializer.SerializeToString(info));
- Normalize(info, isVideo);
+ Normalize(info, service, isVideo);
var data = new LiveStreamData
{
@@ -440,7 +441,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv
}
}
- private void Normalize(MediaSourceInfo mediaSource, bool isVideo)
+ private void Normalize(MediaSourceInfo mediaSource, ILiveTvService service, bool isVideo)
{
if (mediaSource.MediaStreams.Count == 0)
{
@@ -537,6 +538,12 @@ namespace MediaBrowser.Server.Implementations.LiveTv
mediaSource.Bitrate = total;
}
}
+
+ if (!(service is EmbyTV.EmbyTV))
+ {
+ // We can't trust that we'll be able to direct stream it through emby server, no matter what the provider says
+ mediaSource.SupportsDirectStream = true;
+ }
}
private async Task<LiveTvChannel> GetChannel(ChannelInfo channelInfo, string serviceName, Guid parentFolderId, CancellationToken cancellationToken)