diff --git a/Emby.Dlna/PlayTo/PlayToController.cs b/Emby.Dlna/PlayTo/PlayToController.cs index be6810d0e9..2da8bb8609 100644 --- a/Emby.Dlna/PlayTo/PlayToController.cs +++ b/Emby.Dlna/PlayTo/PlayToController.cs @@ -849,7 +849,7 @@ namespace Emby.Dlna.PlayTo if (index == -1) return request; var query = url.Substring(index + 1); - var values = QueryHelpers.ParseQuery(query); + Dictionary values = QueryHelpers.ParseQuery(query); request.DeviceProfileId = values["DeviceProfileId"].ToString(); request.DeviceId = values["DeviceId"].ToString(); diff --git a/MediaBrowser.Model/Services/QueryParamCollection.cs b/MediaBrowser.Model/Services/QueryParamCollection.cs index 09806ed9c2..9f23b2420f 100644 --- a/MediaBrowser.Model/Services/QueryParamCollection.cs +++ b/MediaBrowser.Model/Services/QueryParamCollection.cs @@ -16,7 +16,7 @@ namespace MediaBrowser.Model.Services } - public QueryParamCollection(IDictionary headers) + public QueryParamCollection(IHeaderDictionary headers) { foreach (var pair in headers) { @@ -24,38 +24,6 @@ namespace MediaBrowser.Model.Services } } - public QueryParamCollection(Microsoft.AspNetCore.Http.IHeaderDictionary headers) - { - foreach (var pair in headers) - { - Add(pair.Key, pair.Value); - } - } - - // TODO remove this shit - public QueryParamCollection(WebHeaderCollection webHeaderCollection) - { - foreach (var key in webHeaderCollection.AllKeys) - { - foreach (var value in webHeaderCollection.GetValues(key) ?? Array.Empty()) - { - Add(key, value); - } - } - } - - // TODO remove this shit - public QueryParamCollection(NameValueCollection nameValueCollection) - { - foreach (var key in nameValueCollection.AllKeys) - { - foreach (var value in nameValueCollection.GetValues(key) ?? Array.Empty()) - { - Add(key, value); - } - } - } - public QueryParamCollection(IQueryCollection queryCollection) { foreach (var pair in queryCollection) @@ -74,21 +42,6 @@ namespace MediaBrowser.Model.Services return StringComparer.OrdinalIgnoreCase; } - public string GetKey(int index) - { - return this[index].Name; - } - - public string Get(int index) - { - return this[index].Value; - } - - public virtual string[] GetValues(int index) - { - return new[] { Get(index) }; - } - /// /// Adds a new query parameter. /// @@ -129,16 +82,6 @@ namespace MediaBrowser.Model.Services Add(key, value); } - /// - /// Removes all parameters of the given name. - /// - /// The number of parameters that were removed - /// is null. - public virtual int Remove(string name) - { - return RemoveAll(p => p.Name == name); - } - public string Get(string name) { var stringComparison = GetStringComparison();