update hls query string

This commit is contained in:
Luke Pulverenti
2017-09-29 16:10:13 -04:00
parent 878abbddda
commit 4e4c145855
3 changed files with 18 additions and 7 deletions

View File

@@ -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;
}

View File

@@ -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(" ", "")));
}
}