aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/Playback/UniversalAudioService.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2017-08-03 12:26:01 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2017-08-03 12:26:01 -0400
commitd50ffcbfb22e1b22c80c033606601f22b1de66d2 (patch)
tree9dddf56a20bc3a743596c7689148cfcaee6c79ee /MediaBrowser.Api/Playback/UniversalAudioService.cs
parent0ba267f8e26471b4b831b926027c76798f88bef4 (diff)
3.2.26.13
Diffstat (limited to 'MediaBrowser.Api/Playback/UniversalAudioService.cs')
-rw-r--r--MediaBrowser.Api/Playback/UniversalAudioService.cs18
1 files changed, 14 insertions, 4 deletions
diff --git a/MediaBrowser.Api/Playback/UniversalAudioService.cs b/MediaBrowser.Api/Playback/UniversalAudioService.cs
index 118bf5246..0211fe75e 100644
--- a/MediaBrowser.Api/Playback/UniversalAudioService.cs
+++ b/MediaBrowser.Api/Playback/UniversalAudioService.cs
@@ -128,11 +128,21 @@ namespace MediaBrowser.Api.Playback
var directPlayProfiles = new List<DirectPlayProfile>();
- directPlayProfiles.Add(new DirectPlayProfile
+ var containers = (request.Container ?? string.Empty).Split(new [] { ',' }, StringSplitOptions.RemoveEmptyEntries);
+
+ foreach (var container in containers)
{
- Type = DlnaProfileType.Audio,
- Container = request.Container
- });
+ var parts = container.Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries);
+
+ var audioCodecs = parts.Length == 1 ? null : string.Join(",", parts.Skip(1).ToArray());
+
+ directPlayProfiles.Add(new DirectPlayProfile
+ {
+ Type = DlnaProfileType.Audio,
+ Container = parts[0],
+ AudioCodec = audioCodecs
+ });
+ }
deviceProfile.DirectPlayProfiles = directPlayProfiles.ToArray();