pascalopitz / unoffical-sonos-controller-for-linux

An Electron based linux app for controlling your sonos system.
http://pascalopitz.github.io/unoffical-sonos-controller-for-linux/
MIT License
545 stars 49 forks source link

encode id because sonos doesn't seem to like some special characters in the id #173

Closed s1037989 closed 2 years ago

s1037989 commented 2 years ago

This PR allows for viewing a listing of On this device localMusic even when the files in the local music folder contain special characters that sonos doesn't seem to appreciate. Furthermore, it is able to play these files that contain special characters in the filename.

According to the Sonos documentation for getMetadata, the id is simply a type string(128), but for whatever reason, at least & is not an acceptable character in the id for Sonos. By eliminating the special characters using encodeURIComponent, Sonos is able to list and play the localMusic.

Resolves #172