Closed svrooij closed 2 years ago
From what I can tell, SoCo doesn't encode anything. It only changes "http:" or anything before the first colon to "x-rincon-mp3radio". I'm not sure I agree with that either. The EncodeXml seems reasonable, to ensure invalid xml is never sent. But it might be better to leave the other specific use case encodings (http, x-sonos-hta, ":") up to the caller.
I'm sure these cases ☝️are in here for a specific historical reason (maybe spotify?) but they don't seem universally correct. For instance, the "http" one is just not correct anymore. I verified that Sonos doesn't know what to do with an http uri.
https://github.com/SoCo/SoCo/blob/527876acc234daba10525574f835238de1ad64a1/soco/core.py#L580
The code below needs some work, can someone point out how it should be encoded? From src/helpers/xmlhelper.ts