aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2017-09-29 16:10:13 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2017-09-29 16:10:13 -0400
commit4e4c145855bb2f58492f62b9bfbb6a3f7c1d232f (patch)
treee78c61c047c800abca67d0e2e7939e7068b03853 /MediaBrowser.Model
parent878abbddda4da46811d8709ec90248b9c1b5f569 (diff)
update hls query string
Diffstat (limited to 'MediaBrowser.Model')
-rw-r--r--MediaBrowser.Model/Dlna/StreamBuilder.cs7
-rw-r--r--MediaBrowser.Model/Dlna/StreamInfo.cs8
2 files changed, 12 insertions, 3 deletions
diff --git a/MediaBrowser.Model/Dlna/StreamBuilder.cs b/MediaBrowser.Model/Dlna/StreamBuilder.cs
index 67d9b834f..95a80c34c 100644
--- a/MediaBrowser.Model/Dlna/StreamBuilder.cs
+++ b/MediaBrowser.Model/Dlna/StreamBuilder.cs
@@ -1615,7 +1615,12 @@ namespace MediaBrowser.Model.Dlna
if (!string.IsNullOrWhiteSpace(value))
{
// change from split by | to comma
- item.SetOption(qualifier, "profile", string.Join(",", value.Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries)));
+
+ // strip spaces to avoid having to encode
+ var values = value
+ .Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries);
+
+ item.SetOption(qualifier, "profile", string.Join(",", values));
}
break;
}
diff --git a/MediaBrowser.Model/Dlna/StreamInfo.cs b/MediaBrowser.Model/Dlna/StreamInfo.cs
index 2019acd0d..5a059e91d 100644
--- a/MediaBrowser.Model/Dlna/StreamInfo.cs
+++ b/MediaBrowser.Model/Dlna/StreamInfo.cs
@@ -297,7 +297,10 @@ namespace MediaBrowser.Model.Dlna
// dlna needs to be update to support the qualified params
var profile = item.GetOption("h264", "profile");
- list.Add(new NameValuePair("Profile", profile ?? string.Empty));
+ // Avoid having to encode
+ profile = (profile ?? string.Empty).Replace(" ", "");
+
+ list.Add(new NameValuePair("Profile", profile));
}
// no longer used
@@ -372,7 +375,8 @@ namespace MediaBrowser.Model.Dlna
continue;
}
- list.Add(new NameValuePair(pair.Key, pair.Value));
+ // strip spaces to avoid having to encode h264 profile names
+ list.Add(new NameValuePair(pair.Key, pair.Value.Replace(" ", "")));
}
}