aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/Channels/ChannelManager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Server.Implementations/Channels/ChannelManager.cs')
-rw-r--r--MediaBrowser.Server.Implementations/Channels/ChannelManager.cs18
1 files changed, 15 insertions, 3 deletions
diff --git a/MediaBrowser.Server.Implementations/Channels/ChannelManager.cs b/MediaBrowser.Server.Implementations/Channels/ChannelManager.cs
index 8fb6bb434..b9d218215 100644
--- a/MediaBrowser.Server.Implementations/Channels/ChannelManager.cs
+++ b/MediaBrowser.Server.Implementations/Channels/ChannelManager.cs
@@ -244,7 +244,7 @@ namespace MediaBrowser.Server.Implementations.Channels
return item;
}
- public async Task<IEnumerable<MediaSourceInfo>> GetChannelItemMediaSources(string id, CancellationToken cancellationToken)
+ public async Task<IEnumerable<MediaSourceInfo>> GetChannelItemMediaSources(string id, bool includeDynamicSources, CancellationToken cancellationToken)
{
var item = (IChannelMediaItem)_libraryManager.GetItemById(id);
@@ -255,7 +255,7 @@ namespace MediaBrowser.Server.Implementations.Channels
IEnumerable<ChannelMediaInfo> results;
- if (requiresCallback != null)
+ if (requiresCallback != null && includeDynamicSources)
{
results = await GetChannelItemMediaSourcesInternal(requiresCallback, item.ExternalId, cancellationToken)
.ConfigureAwait(false);
@@ -374,6 +374,18 @@ namespace MediaBrowser.Server.Implementations.Channels
Id = id
};
+ var bitrate = (info.AudioBitrate ?? 0) + (info.VideoBitrate ?? 0);
+
+ if (bitrate > 0)
+ {
+ source.Bitrate = bitrate;
+ }
+
+ if (item is ChannelVideoItem && info.Protocol != MediaProtocol.Rtmp)
+ {
+
+ }
+
return source;
}
@@ -1447,7 +1459,7 @@ namespace MediaBrowser.Server.Implementations.Channels
IProgress<double> progress, CancellationToken cancellationToken)
{
var itemId = item.Id.ToString("N");
- var sources = await GetChannelItemMediaSources(itemId, cancellationToken)
+ var sources = await GetChannelItemMediaSources(itemId, true, cancellationToken)
.ConfigureAwait(false);
var list = sources.Where(i => i.Protocol == MediaProtocol.Http).ToList();