Fix failure when setting a numeric property value

This commit is contained in:
Milan Zamazal 2022-06-06 19:55:25 +02:00
parent 9890f6d0f3
commit d81907be16

View File

@ -172,9 +172,13 @@ Note this interface may not work with all PipeWire versions.")
(pw-cli--parse-properties))) (pw-cli--parse-properties)))
(defun pw-cli--format-property-value (value) (defun pw-cli--format-property-value (value)
(if (consp value) (cond
(concat "[ " (mapconcat #'pw-cli--format-property-value value ", ") " ]") ((consp value)
value)) (concat "[ " (mapconcat #'pw-cli--format-property-value value ", ") " ]"))
((numberp value)
(number-to-string value))
(t
value)))
(defun pw-cli--format-property (property) (defun pw-cli--format-property (property)
(format "%s: %s" (car property) (pw-cli--format-property-value (cdr property)))) (format "%s: %s" (car property) (pw-cli--format-property-value (cdr property))))