bencevans / node-sonos

🔈 Sonos Media Player Interface/Client
https://www.npmjs.com/package/sonos
MIT License
702 stars 147 forks source link

searchMusicLibrary -> Albums with ":" or "/" does not work #450

Closed yoogie27 closed 4 years ago

yoogie27 commented 4 years ago

I am using sonos-web and having issues with some albums. I tracked it down to albums having either ":" or "/" in the name. The backend code calls this.sonos.searchMusicLibrary("albums", "Series1 : Blabla", { start: 0, total: 100}, "/")

Expected Behavior

Return album content

Current Behavior

Empty result

Versions (and Environment)

Node version: v8.12.0 node-sonos version: v0.19.0 OS: Mac / Linux

yoogie27 commented 4 years ago

Potential solution: In lib/sonos.js, line 120, replace encodeURI with encodeURIComponent

svrooij commented 4 years ago

This got something to do with the fact that Sonos used these special characters as delimiter to mark levels when browsing the library will you be creating a PR for it?

Searching for artist Eminem A:ARTIST:Eminem will result in a list of Artists. A:ARTIST/Eminem will result in a list of songs by Eminem. The : and / are special and should be encoded if in the name.

yoogie27 commented 4 years ago

Will do after new year's eve

bencevans commented 4 years ago

:tada: This issue has been resolved in version 1.12.6 :tada:

The release is available on:

Your semantic-release bot :package::rocket: