Don't escape command parameters (#29504)

* Don't escape command parameters

Escaping should only be done when using the tcp socket cli interface which we aren't.

* Updated comment to reflect the changes
This commit is contained in:
Sören Beye 2019-12-08 15:18:46 +01:00 committed by Paulus Schoutsen
parent c78773970b
commit 94dec483e9

View File

@ -538,11 +538,11 @@ class SqueezeBoxDevice(MediaPlayerDevice):
"""
Call Squeezebox JSON/RPC method.
Escaped optional parameters are added to the command to form the list
of positional parameters (p0, p1..., pN) passed to JSON/RPC server.
Additional parameters are added to the command to form the list of
positional parameters (p0, p1..., pN) passed to JSON/RPC server.
"""
all_params = [command]
if parameters:
for parameter in parameters:
all_params.append(urllib.parse.quote(parameter, safe="+:=/?"))
all_params.append(parameter)
return self.async_query(*all_params)